Generalized Projections: A Powerful Query-Optimization Technique
Venky Harinarayan, Ashish Kumar Gupta · 1994
In this paper we introduce generalized projections (GP). GPs capture aggregations, groupbys, conventional projection with duplicate elimination (distinct), and duplicate preserving projections. We develop a technique for pushing GPs down query trees of Select-project-join queries that may use aggregations like max, sum, etc. and that use arbitrary functions in their selection conditions. Our technique pushes down to the lowest levels of a query tree aggregation computation, duplicate elimination, and function computation. The technique also creates aggregations in queries that did not use aggregation to begin with. Our technique is important since applying aggregations early in query processing can provide significant performance improvements. In addition to their value in query optimization, generalized projections unify set and duplicate semantics, and help better understand aggregations. 1 Introduction A fundamental problem in query processing is deciding when to drop rows (tuples...