Efficiently processing complex queries is one of the key requirements of data-warehousing applications. This has led to new query processing and optimization techniques for SQL. Unfortunately, sometimes the structure of the query language (SQL) itself impedes use of efficient query processing. This is not an issue of expressivity of SQL. Rather, it is a matter of being able to express queries succinctly so that the optimizer can identify the most efficient execution. For example, the "Cube" construct suggested in Gray et.al.  does not enhance expressivity but makes it possible for optimizers to identify efficient execution plans for aggregate queries. In the same spirit, this paper introduces an enhancement to SQL that simplifies expression (and optimization) of aggregate queries.
The key observation in the paper is that SQL lacks features to express computation that involve tuples within a group created via a group-by clause. The motivating examples in the paper (Section 2.1) are natural, e.g., "For each customer, find the longest call and the area code to which it was made", and nicely lead to the introduction of an iterator over groups (Section 3.1). It is not hard to see that how their extension can help optimize execution of an important class of complex aggregate queries.
Copyright © 2000 by the author(s). Review published with permission.