摘要:
Provided are a techniques for processing a query including semi-joins. At execution time, a next semi-join is selected from the semi-joins for execution in a current round of semi-join executions. A reporting threshold is determined that indicates a number of record-identifiers to be retrieved for the determined semi-join. The selected semi-join is executed until the determined number of record identifiers are retrieved.
摘要:
Provided are a method, system, and program for selecting a join order for tables subject to a join operation. An estimation is made of a join cost to perform joins on permutations of at least two of the tables, wherein each join permutation indicates an order of joining the tables. A determination is made as to whether sufficient computational resources are available to perform a join cost analysis of further join permutations of the tables. If sufficient computational resources are not available, then a determination is made of a restricted subset of remaining join permutations of at least two of the tables for which join costs have not been estimated that is less than all the remaining join permutations. The join costs of permutations of tables in the restricted subset is estimated and the estimated join costs are used to select one join permutation of all the tables having a lowest estimated join cost.
摘要:
In various embodiments, a method, apparatus, and article of manufacture collect statistics in a database management system. A workload comprising a plurality of database queries is received. Query statistics for the database queries are identified. The query statistics for the database queries are consolidated to provide consolidated statistics. One or more statistics collection requests are generated based on the consolidated statistics.
摘要:
A method, computer program product, and system for managing row identifier (RID) list processing on an index are provided. The method, computer program product, and system provide for accessing one or more key values in the index based on one or more keys specified in a query, retrieving a plurality of row identifiers corresponding to the one or more key values from the index, and predicting an actual number of row identifiers to be retrieved from the index based on the one or more key values accessed and the plurality of row identifiers retrieved.
摘要:
A method of, a computer program product for and a computer system for managing statistics in a database management system are provided. A value of a volatility of a statistic is determined. A value of a staleness of the statistic is determined using the value of the volatility. A statistics collection task is generated in response to, at least in part, the value of the staleness exceeding a value of a staleness threshold. The statistics collection task is executed to collect an additional value of the statistic. The additional value of the statistic is stored.
摘要:
A system and computer readable medium for executing a query to access data stored in a database, wherein the query includes a plurality of DISTINCT keys, is disclosed. The system and computer readable medium includes a capture module for identifying each of the plurality of DISTINCT keys in the query and a sort module coupled to the capture module for determining if more than one sort is needed to execute the query, performing a first DISTINCT operation on a first DISTINCT key of the plurality of DISTINCT keys, storing data fetched from the first DISTINCT operation in a master workfile only if more than one sort process is needed to execute the query, and utilizing the master workfile to perform subsequent DISTINCT operations on the other of the plurality of DISTINCT keys.
摘要:
A method, computer program product, and system for managing row identifier (RID) list processing on an index are provided. The method, computer program product, and system provide for accessing one or more key values in the index based on one or more keys specified in a query, retrieving a plurality of row identifiers corresponding to the one or more key values from the index, and predicting an actual number of row identifiers to be retrieved from the index based on the one or more key values accessed and the plurality of row identifiers retrieved.
摘要:
Techniques are provided for processing a query using an index. It is determined whether a number of consecutive keys that evaluate to a false-positive when applying a screening predicate in the query exceeds a false-positive predefined value. One or more keys in the index are skipped in response to determining that the number of consecutive keys exceeds the false-positive predefined value.
摘要:
Provided are a method, system, an program for tuning a database query. Provided are a base access plan to implement the database query and statistics including information on a layout of the database against which the query will be executed. The statistics are processed to determine performance problems with the base access plan as part of a first analysis of the base access plan and the determined performance problems are processed as part of a second analysis to provide an analysis of the determined performance problems and processing cost of the base access plan. Recommendations are generated to tune the base access plan to improve performance.
摘要:
Embodiments of the present invention provide a “look-ahead” form prefetch. Look-ahead prefetch may utilize a look-ahead queue to prefetch multiple pages asynchronously. The look-ahead queue may hold a plurality of search keys that are related to a transaction. When accessing a table, an index manager may retrieve the table's index and scan the index based on the search keys from the look-ahead queue to find the RIDs in the table that match the search keys. The index manager may then accumulate these RIDs into a prefetch list. A prefetch manager may read the prefetch list, determine locations for the pages of the table that contain the records identified by the RIDs, and dispatch prefetch tasks to the appropriate storage device for these pages.