DocumentCode
1719830
Title
Performing group-by before join [query processing]
Author
Yan, Weipeng P. ; Larson, Per-Ake
Author_Institution
Dept. of Comput. Sci., Waterloo Univ., Ont., Canada
fYear
1994
Firstpage
89
Lastpage
100
Abstract
Assume that we have an SQL query containing joins and a group-by. The standard way of evaluating this type of query is to first perform all the joins and then the group-by operation. However, it may be possible to perform the group-by early, that is, to push the group-by operation past one or more joins. Early grouping may reduce the query processing cost by reducing the amount of data participating in joins. We formally define the problem, adhering strictly to the semantics of NULL and duplicate elimination in SQL2, and prove necessary and sufficient conditions for deciding when this transformation is valid. In practice, it may be expensive or even impossible to test whether the conditions are satisfied. Therefore, we also present a more practical algorithm that tests a simpler, sufficient condition. This algorithm is fast and detects a large subclass of transformable queries
Keywords
SQL; query processing; SQL query; group-by; joins; necessary and sufficient conditions; query processing; sufficient condition; Algebra; Computer science; Costs; Null value; Performance evaluation; Query processing; Sufficient conditions; Testing;
fLanguage
English
Publisher
ieee
Conference_Titel
Data Engineering, 1994. Proceedings.10th International Conference
Conference_Location
Houston, TX
Print_ISBN
0-8186-5402-3
Type
conf
DOI
10.1109/ICDE.1994.283001
Filename
283001
Link To Document