Abstract: A database query is modified to improve performance by identifying portions of database tables that are likely to be reused and modifying the database query accordingly. According to certain embodiments, the degree of selectivity with which a table is accessed is used to identify tables that are likely to be reused in subsequent database operations.
Abstract: Apparatuses and methods for optimizing access path are provided. Execution of a query statement is sampled to obtain the information about a plurality of executing instances, the information about each executing instance comprises the literal value of the query statement in the instance and the filter factor corresponding to the literal value. The plurality of instances are grouped into a plurality of groups based on the filter factors corresponding to the literal values. The average filter factor of each group and the occurrence frequency of the group are obtained. The candidate access path created for the average filter factor of each group is accordingly obtained, and by taking the occurrence frequencies as weights, the weighted execution cost of each candidate access path is calculated for each group. The candidate access path with the minimum sum of the weighted execution costs for all groups is determined as the optimal access path.
Type:
Grant
Filed:
December 20, 2012
Date of Patent:
June 23, 2015
Assignee:
INTERNATIONAL BUSINESS MACHINES CORPORATION
Inventors:
Patrick D. Bossman, You-Chin Fuh, Ke W. Wei, Jing Zhou, Xiang Zhou