Data base optimizer using most frequency values statistics
First Claim
1. In a method for accessing data of a relational data base management system having at least one index, the improvement characterized by the steps performed by a computer of:
- (a) selecting a number of most frequently occurring values of at least part of a key of the index, the number being greater than zero and less than a total number of such values;
(b) collecting frequency of occurrence statistics for the selected most frequently occurring values of the index;
(c) estimating a time required for using the index as the access path, based at least in part on the collected frequency of occurrence statistics;
(d) selecting an access path based at least in part on the estimated time; and
(e) accessing the data using the selected access path.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for more accurately estimating the time required to process a data base query using a selected index. A selected number of the most frequently occurring index key values (38) are collected during an index sequential scan. These most frequency occurring values are stored as percentage frequencies of occurrence in the data base system'"'"'s catalog (42). Estimated access and processing times (NPAR, NPAS, NCPU) for a given query are calculated based on the stored frequencies where possible. Where the query'"'"'s search criteria specify values other than the stored most frequently occurring values, those values are assumed to be uniformly distributed.
-
Citations
9 Claims
-
1. In a method for accessing data of a relational data base management system having at least one index, the improvement characterized by the steps performed by a computer of:
-
(a) selecting a number of most frequently occurring values of at least part of a key of the index, the number being greater than zero and less than a total number of such values; (b) collecting frequency of occurrence statistics for the selected most frequently occurring values of the index; (c) estimating a time required for using the index as the access path, based at least in part on the collected frequency of occurrence statistics; (d) selecting an access path based at least in part on the estimated time; and (e) accessing the data using the selected access path. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for accessing data of a relational data base management system having at least one index, comprising the steps performed by a computer of:
-
(a) selecting a number of most frequently occurring values of at least part of a key of the index, the number being greater than zero and less than a total number of values of said at least part of the key; (b) collecting frequency of occurrence statistics for the selected most frequently occurring values of the index; (c) storing the statistics in the system; (d) estimating a time required for using the index as the access path, based at least in part on the stored frequency of occurrence statistics; (e) selecting an access path based at least in part on the estimated time; and (f) accessing the data using the selected access path.
-
Specification