摘要:
In an embodiment, a FIRSTIO execution plan is selected that has a lowest estimated execution time for finding a number of records that satisfy the query and are simultaneously viewable. An ALLIO execution plan is selected that has a lowest estimated execution time for finding all records that satisfy the query. The FIRSTIO execution plan is executed for a first time period to create a FIRSTIO result set. The ALLIO execution plan is executed for a second time period to create an ALLIO result set. The FIRSTIO result set is displayed if the FIRSTIO result set comprises more records than the ALLIO result set. The ALLIO result set is displayed if the ALLIO result set comprises more records than the FIRSTIO result set. In an embodiment, the first and second time periods expire in response to the expiration of a maximum time specified by the query.
摘要:
In an embodiment, a FIRSTIO execution plan is selected that has a lowest estimated execution time for finding a number of records that satisfy the query and are simultaneously viewable. An ALLIO execution plan is selected that has a lowest estimated execution time for finding all records that satisfy the query. The FIRSTIO execution plan is executed for a first time period to create a FIRSTIO result set. The ALLIO execution plan is executed for a second time period to create an ALLIO result set. The FIRSTIO result set is displayed if the FIRSTIO result set comprises more records than the ALLIO result set. The ALLIO result set is displayed if the ALLIO result set comprises more records than the FIRSTIO result set. In an embodiment, the first and second time periods expire in response to the expiration of a maximum time specified by the query.
摘要:
In an embodiment, a threshold value is calculated for a current entry in a first column of an index. If the current entry has been read a number of times by execution of an execution plan that is more than the threshold value and the current entry points to at least one row in a table and not all of the at least one row have been selected by the execution plan for inclusion in a result set as satisfying a query that the execution plan implements, then a new entry is added to the index.
摘要:
A disappearing index allows faster processing of a database query without the startup time of a prior art sparse index. The disappearing index starts as a full index but is trimmed of index values that point to a row in the table that is not selected by the query. Thus the traditional index disappears as it becomes a sparse index tailored to the query. The query is able to execute faster using the now sparse index since the target database table is not accessed for duplicate values in the base table of the query. The query optimizer may determine to use a disappearing index based on estimates of the number of duplicate values in the base table. When the query is complete, the created disappearing table may be discarded or used for other queries that match the selection of the query that created the disappearing index.
摘要:
In an embodiment, a threshold value is calculated for a current entry in a first column of an index. If the current entry has been read a number of times by execution of an execution plan that is more than the threshold value and the current entry points to at least one row in a table and not all of the at least one row have been selected by the execution plan for inclusion in a result set as satisfying a query that the execution plan implements, then a new entry is added to the index.
摘要:
A disappearing index allows faster processing of a database query without the startup time of a prior art sparse index. The disappearing index starts as a full index but is trimmed of index values that point to a row in the table that is not selected by the query. Thus the traditional index disappears as it becomes a sparse index tailored to the query. The query is able to execute faster using the now sparse index since the target database table is not accessed for duplicate values in the base table of the query. The query optimizer may determine to use a disappearing index based on estimates of the number of duplicate values in the base table. When the query is complete, the created disappearing table may be discarded or used for other queries that match the selection of the query that created the disappearing index.
摘要:
A method, apparatus and program product that determine a density of a key value referenced in a database query over at least one range of rows, and utilize the determined density to optimize the database query. By doing so, the density of various key values may be determined and compared, and a bit map may be generated over the range of rows of the key value that is denser, resulting in a reduction of resources to build and use the bit map. Moreover, from the bit map over the range of rows to be selected after using the determined density, dense regions may be identified that can be used to optimize block I/O's according to the number of rows to be selected based on the query.
摘要:
A method, apparatus and program product that determine a density for each key value of a plurality of key values in a table over at least one range of rows in the database table, and store the determined densities in a data structure for use in optimizing a query that references a key value in the plurality of key values in the table. By doing so, the density of various key values may be determined and dynamically maintained, often resulting in optimization data for improved query optimization.
摘要:
A method, apparatus, and program product is provided to, in response to receiving a first database query for which usage of shared weight indices is prohibited, determine whether a shared weight index associated with a column of a database table referenced by the first database query can be utilized as a non-shared weight index to optimize the database query. The method, apparatus, and program product determine whether the column includes at least one changed weight value and determines whether the database query references at least one changed weight value in the column. The shared weight index is utilized to optimize the first database query in response to determining that the shared weight index can be utilized as a non-shared weight index to optimize the first database query.
摘要:
A method, apparatus and program product that determine a density of a key value referenced in a database query over at least one range of rows, and utilize the determined density to optimize the database query. By doing so, the density of various key values may be determined and compared, and a bit map may be generated over the range of rows of the key value that is denser, resulting in a reduction of resources to build and use the bit map. Moreover, from the bit map over the range of rows to be selected after using the determined density, dense regions may be identified that can be used to optimize block I/O's according to the number of rows to be selected based on the query.