Skip to main content

Computing SQL Queries with Boolean Aggregates

  • Conference paper
Data Warehousing and Knowledge Discovery (DaWaK 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2737))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Cao, B., Badia, A.: Subquery Rewriting for Optimization of SQL Queries (submitted for publication)

    Google Scholar 

  2. Chaudhuri, S., Shim, K.: Including Group-By in Query Optimization. In: Proceedings of the 2th VLDB Conference (1994)

    Google Scholar 

  3. Chaudhuri, S., Shim, K.: An Overview of Cost-Based Optimization of Queries with Aggregates. Data Engineering Bulletin 18(3) (1995)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Galindo-Legaria, C., Rosenthal, A.: Outerjoin Simplification and Reordering for Query Optimization. ACM TODS 22(1) (1997)

    Google Scholar 

  7. Ganski, R., Wong, H.: Optimization of Nested SQL Queries Revisited. In: Proceedings of the ACM SIGMOD Conference (1987)

    Google Scholar 

  8. Goel, P., Iyer, B.: SQL Query Optimization: Reordering for a General Class of Queries. In: Proceedings of the 1996 ACM SIGMOD Conference (1996)

    Google Scholar 

  9. Gupta, A., Harinayaran, V., Quass, D.: Aggregate-Query Processing in Data Warehousing Environments. In: Proceedings of the VLDB Conference (1995)

    Google Scholar 

  10. Kim, W.: On Optimizing an SQL-Like Nested Query. ACM Transactions On Database Systems 7(3) (September 1982)

    Google Scholar 

  11. Gupta, A., Mumick, I.S. (eds.): Materialized Views: Techniques, Implementations and Applications. MIT Press, Cambridge (1999)

    Google Scholar 

  12. Melton, J.: Advanced SQL: 1999, Understanding Object-Relational and Other Advanced Features. Morgan Kaufmann, San Francisco (2003)

    Google Scholar 

  13. Muralikrishna, M.: Improving Unnesting Algorithms for Join Aggregate Queries in SQL. In: Proceedings of the VLDB Conference (1992)

    Google Scholar 

  14. Ross, K., Rao, J.: Reusing Invariants: A New Strategy for Correlated Queries. In: Proceedings of the ACM SIGMOD Conference (1998)

    Google Scholar 

  15. Ross, K., Chatziantoniou, D.: Groupwise Processing of Relational Queries. In: Proceedings of the 23rd VLDB Conference (1997)

    Google Scholar 

  16. 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)

    Google Scholar 

  17. Seshadri, P., Pirahesh, H., Cliff Leung, T.Y.: Complex Query Decorrelation. In: Proceedings of ICDE 1996, pp. 450–458 (1996)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. Mumick, I.S., Pirahesh, H.: Implementation of Magic-sets in a Relational Database System. In: Proceedings of the SIGMOD Conference, pp. 103–114 (1994)

    Google Scholar 

  20. Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is Relevant. In: Proceedings of the SIGMOD Conference, pp. 247–258 (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics