abstract |
A computerized query optimizer for use with a database system having an ordered set of records. The optimizer employs a scanner and an evaluator. A query is composed as ranges of record values related by logical operators. The query is converted to a Boolean tree in canonical form. The tree is optimized to express the ranges as a set of disjoint semi-open ranges. The scanner reads a next record from the database. The evaluator, using the query, delivers a logical true or false condition for the record. In addition, the evaluator also delivers an interval of values having the same logical condition as the logical condition of the record. If this logical condition is false, the scanner skips over records having values of the interval, otherwise, if the logical condition is true, records having values of the interval are selected. |