skip to main content
10.1145/583890.583898acmconferencesArticle/Chapter ViewAbstractPublication PagescikmConference Proceedingsconference-collections
Article

Adding subqueries to MySQL, what does it take to have a decision-support engine?

Published:08 November 2002Publication History

ABSTRACT

MySQL is an OLTP system without the ability to handle SQL subqueries. As part of our project in query optimization, we add subquery processing to MySQL through rewriting. First, we incorporate the ability to handle subqueries in the FROM clause; then rewrite queries with subqueries in the WHERE clause by moving the subquery to the FROM clause and introducing suitable conditions to link the subquery and the main query tables. The result is a complete and correct unnesting procedure for SQL queries. The idiosyncrasies of SQL semantics make some rewritings tricky. While optimization issues are not directly addressed, the rewriting opens up the possibility of more efficient query processing in several cases.

References

  1. Chanda, M. and Badia, A. Adding Subqueries to MySQL Through Query Rewriting, Technical Report 02-01. Available at http://date.spd.louisville.edu/forloop.Google ScholarGoogle Scholar
  2. Chaudhuri, S. and Dayal, U., An Overview of Data Warehousing and OLAP Technology, ACM SIGMOD Record 26(1), March 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Dayal, U. Of Nests and Trees: A Unified Approach to Processing Queries That Contain Nested Subqueries, Aggregates, andGoogle ScholarGoogle Scholar
  4. Galindo-Legaria, C. and Rosenthal, A. Outerjoin Simplification and Reordering for Query Optimization, ACM TODS, 22(1), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ganski, R. and Wong, H. Optimization of Nested SQL Queries Revisited, in Proceedings of the 1987 ACM SIGMOD Conference. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Gray, J., Bosworth, A., Layman, A. and Pirahesh, H. DataCube: A Relational Aggregation Operator Generalizing Group By, Cross-Tab, and Sub-Totals. In Proceedings of the 12th ICDE Conference, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Goel, P. and Iyer, B. SQL Query Optimization: Reordering for a General Class of Queries, in Proceedings of the 1996 ACM SIGMOD Conference. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jarke, M., Lenzerini, M., Vassiliou, Y. and Vassiliadis, P. Fundamentals of Data Warehousing, Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Kimball, Why Decision Support Fails and how to fix it, SIGMOD Record, 24(3), 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. W. Kim, On Optimizing an SQL-Like Nested Query, ACM TODS, 7(3), 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Muralikrishna, M. Improving Unnesting Algorithms for Join Aggregate Queries in SQL, in Proceedings of the 18th VLDB Conference, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. MYSQL, http://www.mysql.com.Google ScholarGoogle Scholar

Index Terms

  1. Adding subqueries to MySQL, what does it take to have a decision-support engine?

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        DOLAP '02: Proceedings of the 5th ACM international workshop on Data Warehousing and OLAP
        November 2002
        88 pages
        ISBN:1581135904
        DOI:10.1145/583890

        Copyright © 2002 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 8 November 2002

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate29of79submissions,37%

        Upcoming Conference

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader