Determination of Second-Highest Value, Second-Lowest Value and Number of Distinct Values in an Indexed Table
Original Publication Date: 1989-Sep-01
Included in the Prior Art Database: 2005-Jan-31
The method used to compute the second-highest distinct value, second-lowest distinct value, and number of distinct values in a table (these values are used for optimization of queries) usually involves comparing each new record that is read with "running" second-high, second-low, high, and low values, and using a hash-in method to statistically estimate the number of distinct values. An easier, faster method can be used on the first key column of an indexed table.