Image Number 6 for United States Patent #6088524.
A method and apparatus for optimizing a query involving aggregation. Aggregation predicates are represented by a constraint language through which relationships involving aggregation predicates can be shown. As a result, new predicates can be inferred from an initial set of aggregation predicates and optimization techniques which involve inferring new predicates can be applied. It is also shown how to restrict the inferences involving aggregation predicates to only those predicates which will lead to new predicates which are relevant to query optimization. In general, the technique is not limited to query optimization, but may be applied to various applications involving the manipulation of aggregation predicates.