Abstract
We introduce a new method for optimization of SQL queries with nested subqueries. The method is based on the idea of Boolean aggregates, aggregates that compute the conjunction or disjunction of a set of conditions. When combined with grouping, Boolean aggregates allow us to compute all types of non-aggregated subqueries in a uniform manner. The resulting query trees are simple and amenable to further optimization. Our approach can be combined with other optimization techniques and can be implemented with a minimum of changes in any cost-based optimizer.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Cao, B., Badia, A.: Subquery Rewriting for Optimization of SQL Queries (submitted for publication)
Chaudhuri, S., Shim, K.: Including Group-By in Query Optimization. In: Proceedings of the 2th VLDB Conference (1994)
Chaudhuri, S., Shim, K.: An Overview of Cost-Based Optimization of Queries with Aggregates. Data Engineering Bulletin 18(3) (1995)
Cohen, S., Nutt, W., Serebrenik, A.: Algorithms for Rewriting Aggregate Queries using Views. In: Proceedings of the Design and Management of Data Warehouses Conference (1999)
Dayal, U.: Of Nests and Trees: A Unified Approach to Processing Queries That Contain Nested Subqueries, Aggregates, and Quantifiers. In: Proceedings of the VLDB Conference (1987)
Galindo-Legaria, C., Rosenthal, A.: Outerjoin Simplification and Reordering for Query Optimization. ACM TODS 22(1) (1997)
Ganski, R., Wong, H.: Optimization of Nested SQL Queries Revisited. In: Proceedings of the ACM SIGMOD Conference (1987)
Goel, P., Iyer, B.: SQL Query Optimization: Reordering for a General Class of Queries. In: Proceedings of the 1996 ACM SIGMOD Conference (1996)
Gupta, A., Harinayaran, V., Quass, D.: Aggregate-Query Processing in Data Warehousing Environments. In: Proceedings of the VLDB Conference (1995)
Kim, W.: On Optimizing an SQL-Like Nested Query. ACM Transactions On Database Systems 7(3) (September 1982)
Gupta, A., Mumick, I.S. (eds.): Materialized Views: Techniques, Implementations and Applications. MIT Press, Cambridge (1999)
Melton, J.: Advanced SQL: 1999, Understanding Object-Relational and Other Advanced Features. Morgan Kaufmann, San Francisco (2003)
Muralikrishna, M.: Improving Unnesting Algorithms for Join Aggregate Queries in SQL. In: Proceedings of the VLDB Conference (1992)
Ross, K., Rao, J.: Reusing Invariants: A New Strategy for Correlated Queries. In: Proceedings of the ACM SIGMOD Conference (1998)
Ross, K., Chatziantoniou, D.: Groupwise Processing of Relational Queries. In: Proceedings of the 23rd VLDB Conference (1997)
Rao, J., Lindsay, B., Lohman, G., Pirahesh, H., Simmen, D.: Using EELs, a Practical Approach to Outerjoin and Antijoin Reordering. In: Proceedings of ICDE 2001 (2001)
Seshadri, P., Pirahesh, H., Cliff Leung, T.Y.: Complex Query Decorrelation. In: Proceedings of ICDE 1996, pp. 450–458 (1996)
Seshadri, P., Hellerstein, J.M., Pirahesh, H., Cliff Leung, T.Y., Ramakrishnan, R., Srivastava, D., Stuckey, P.J., Sudarshan, S.: Cost-Based Optimization for Magic: Algebra and Implementation. In: Proceedings of the SIGMOD Conference, pp. 435–446 (1996)
Mumick, I.S., Pirahesh, H.: Implementation of Magic-sets in a Relational Database System. In: Proceedings of the SIGMOD Conference, pp. 103–114 (1994)
Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is Relevant. In: Proceedings of the SIGMOD Conference, pp. 247–258 (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Badia, A. (2003). Computing SQL Queries with Boolean Aggregates. In: Kambayashi, Y., Mohania, M., Wöß, W. (eds) Data Warehousing and Knowledge Discovery. DaWaK 2003. Lecture Notes in Computer Science, vol 2737. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45228-7_39
Download citation
DOI: https://doi.org/10.1007/978-3-540-45228-7_39
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40807-9
Online ISBN: 978-3-540-45228-7
eBook Packages: Springer Book Archive