摘要 |
A method for determining the cost of evaluating queries against a database. The method includes receiving a condition, or query; determining the cost of one or more fixed cost operators within the condition; and determining the cost of one or more variable coefficients within the condition. The method may also be extended to determine the cost of successive conditions within a set of conditions as a function of the cost of a current condition and the combined selectivity of previous conditions within the set of conditions; and to determine an optimal order of conditions within a set of conditions. To determine an optimal order of conditions within a set of conditions, the method comprises determining the cost of one or more conditions within the set of conditions; determining the selectivity of one or more conditions within the set of conditions; and determining an optimal order of at least some of the conditions based at least partly on the determined cost and determined selectivity of one or more of the conditions.
|