Index key range estimator
First Claim
1. A key estimator for estimating the number of keys over a key range defined by key endpoints in a tree-like index having a plurality of pages, comprising:
- search means for searching the index for each of the key defining the key range and keeping track of the level of search required for each range endpoint key;
limiting means for providing a level limit as a function of the levels of search for each range endpoint key and a desired granularity of search;
range search means for searching the index between the range endpoint keys down to the level limit determined by the limiting means; and
key estimator means for counting the number of pages pointed to during such range search.
2 Assignments
0 Petitions
Accused Products
Abstract
A key estimator estimates the number of keys over a key range defined by key endpoints in an index to a data space. The number of keys in the key range required to be processed for a particular operation is estimated as a function of the number of pages referenced during a range level limited search. Two keys defining range endpoint keys are searched down to their lowest level in the tree. The level limit is then calculated as a function of desired granularity or accuracy of the estimate. The entire range of keys in the desired key range is then searched down to the level limit and the number of pages referenced during the search is counted and multiplied by an average key density per page to calculate the number of keys in the range.
-
Citations
21 Claims
-
1. A key estimator for estimating the number of keys over a key range defined by key endpoints in a tree-like index having a plurality of pages, comprising:
- search means for searching the index for each of the key defining the key range and keeping track of the level of search required for each range endpoint key;
limiting means for providing a level limit as a function of the levels of search for each range endpoint key and a desired granularity of search; range search means for searching the index between the range endpoint keys down to the level limit determined by the limiting means; and key estimator means for counting the number of pages pointed to during such range search. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
- search means for searching the index for each of the key defining the key range and keeping track of the level of search required for each range endpoint key;
-
16. A method of estimating the number of keys in a key range over an index wherein the index is stored in page form, said pages having page pointers to other pages in the index, the method, comprising the steps of:
-
(a) defining a left endpoint and a right endpoint in the key range; (b) searching each endpoint of the key range to determine a maximum level for each endpoint; (c) determining a lower level limit as a function of the maximum level for each endpoint; (d) searching the key range between the ends of the key range and at, and above the lower level limit; and (e) counting the number of page pointers, encountered during the range search, residing on pages not exceeding the lower level limit. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A method of estimating the number of keys in a key range over an index wherein the index is stored in page form, said pages having page pointers to other pages in the index, the method, comprising the steps of:
-
(a) defining a left endpoint key and a right endpoint key of the key range; (b) determinig a lower level limit; (c) searching the key range between the endpoints of the key range, but not below the lower level limit; (d) counting the number of page points, encountered during the search of the key range; and (e) multiplying the number page points counter by an average number of keys per page value associated with said index to obtain an estimate of the number of keys in the index.
-
Specification