Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

Improved Open-Ended Key Estimation Performance

The Estimate Key function, ESTKEY(), was improved such that if either the upper or lower limit of the range is opened-ended, efficiencies are gained. By open-ended we mean that the estimated number of keys is either greater than a lower limit or smaller than an upper limit.

A NULL pointer is now passed in for the upper or lower limit when this condition is met and the tree manipulations for the open-ended limit can be skipped. The appropriate percentile for the opened-ended limit is simply assigned: 0 for no lower limit or 100 for an opened-ended upper limit.

The tree manipulations consist of a binary search using the First Key routine, FRCKEY(), to estimate the percentile of a given limit. To permit some rounding to be accommodated, we actually use a range from 0 to 1000 instead of 0 to 100. Think baseball batting averages.

TOCIndex