摘要:
An apparatus, program product and method for estimating the number of keys within an index key range over an index using page pointers to pages in the index comprises a program configured for scanning the index, from a divergence point of the key range, until a page pointer is found and incrementing a counter for each found page pointer. The program is further configured for determining if the page pointer points to a leaf page in the index, and if it does, continuing the scan to find the next page pointer without going to the corresponding leaf page. Otherwise, the program continues the scan to find the next page pointer and continues the scan for page pointers and increments the counter until the index is scanned for the entire key range. Upon completion of the scan, the program determines an estimate of the number of keys utilizing the counter.