Alon Y. Levy , Inderpal Singh Mumick , Reasoning with Aggregation Constraints Proceedings of the Conference on Extending Database Technology, EDBT-96 1996
Abstract: Aggregation queries are becoming increasingly common as databases
continue to grow and provide parallel execution engines to enable
complex queries over larger and larger amounts of data.
Consequently, optimization of aggregation queries is becoming
very important.
In this paper we present a framework for reasoning with constraints
arising from the use of aggregations.
The framework introduces a constraint language, three types of
inference rules to derive constraints that must hold given a set of
aggregations and constraints in the query, and a sound and tractable
inference procedure.
The constraint language and inference procedure can be used by any
system that deals with aggregations -- be it constraint programming,
databases, or global information systems.
However, the prime application of aggregation reasoning is in database query
optimizers to optimize SQL (or object-SQL) queries with grouping and
aggregation. Our framework allows aggregation reasoning to be
incorporated into an optimizer in a modular fashion, and we illustrate
this through a detailed example.