skip to main content
10.1145/1376616.1376671acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Optimizing complex queries with multiple relation instances

Authors Info & Claims
Published:09 June 2008Publication History

ABSTRACT

Today's query processing engines do not take advantage of the multiple occurrences of a relation in a query to improve performance. Instead, each instance is treated as a distinct relation and has its own independent table access method. In this paper, we present MAPLE, a Multi-instance-Aware PLan Evaluation engine that enables multiple instances of a relation to share one physical scan (called SharedScan) with limited buffer space. During execution, as SharedScan pulls a tuple for any instance, that tuple is also pushed to the buffers of other instances with matching predicates. To avoid buffer overflow, a novel interleaved execution strategy is proposed: whenever an instance's buffer becomes full, the execution is temporarily switched to a drainer (an ancestor blocking operator of the instance) to consume all the tuples in the buffer. Thus, the execution is interleaved between normal processing and drainers. We also propose a cost-based approach to generate a plan to maximize the shared scan benefit as well as to avoid interleaved execution deadlocks. MAPLE is light-weight and can be easily integrated into existing RDBMS executors. We have implemented MAPLE in PostgreSQL, and our experimental study on the TPC-DS benchmark shows significant reduction in execution time.

References

  1. Microsoft SQL Server Library. http://msdn2.microsoft.com/en-us/library/bb545450.aspx.Google ScholarGoogle Scholar
  2. PostgreSQL. http://www.postgresql.org/.Google ScholarGoogle Scholar
  3. TPC BENCHMARK Decision Support. http://www.tpc.org/tpcds/.Google ScholarGoogle Scholar
  4. R. Bhashyam. TPC-D: the challenges, issues and results. SIGMOD Rec., 25(4):89--93, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. E. I. Chong, S. Das, G. Eadon, and J. Srinivasan. An efficient sql-based rdf querying scheme. In VLDB, pages 1216--1227, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. S. Colby, R. L. Cole, E. Haslam, N. Jazayeri, G. Johnson, W. J. McKenna, L. Schumacher, and D. Wilhite. Redbrick vista: Aggregate computation and management. In ICDE, pages 174--177, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. N. Dalvi, S. Sanghai, P. Roy, and S. Sudarshan. Pipelining in multi-query optimization. Journal of Computer and System Sciences, 66(4):728--762, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Graefe. Query evaluation techniques for large databases. ACM Computing Surveys, 25(2):73--170, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Grust, M. V. Keulen, and J. Teubner. Accelerating xpath evaluation in any rdbms. ACM Trans. Database Syst., 29(1):91--131, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Harizopoulos, V. Shkapenyuk, and A. Ailamaki. Qpipe: a simultaneously pipelined relational query engine. In SIGMOD, pages 383--394, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. A. Lang, B. Bhattacharjee, T. Malkemus, S. Padmanabhan, and K. Wong. Increasing buffer-locality for multiple relational table scans through grouping and throttling. In ICDE, pages 1136--1145, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. A. Lang, B. Bhattacharjee, T. Malkemus, and K. Wong. Increasing buffer-locality for multiple index based scans through intelligent placement and index scan speed control. In VLDB, pages 1298--1309, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. E. J. O'Neil, P. E. O'Neil, and G. Weikum. The lru-k page replacement algorithm for database disk buffering. In SIGMOD, pages 297--306, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Roy, S. Seshadri, S. Sudarshan, and S. Bhobe. Efficient and extensible algorithms for multi query optimization. In SIGMOD, pages 249--260, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. T. Urhan, M. J. Franklin, and L. Amsaleg. Cost-based query scrambling for initial delays. SIGMOD Rec., 27(2):130--141, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. Wilkinson, C. Sayers, H. A. Kuno, and D. Reynolds. Efficient rdf storage and retrieval in jena2. In SWDB, pages 131--150, 2003.Google ScholarGoogle Scholar
  17. Y. Zhao, P. M. Deshpande, J. F. Naughton, and A. Shukla. Simultaneous optimization and evaluation of multiple dimensional queries. In SIGMOD, pages 271--282, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Zhou, P.-A. Larson, J.-C. Freytag, and W. Lehner. Efficient exploitation of similar subexpressions for query processing. In SIGMOD, pages 533--544, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Zukowski, S. Heman, N. Nes, and P. Boncz. Cooperative scans: dynamic bandwidth sharing in a dbms. In VLDB, pages 723--734, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Optimizing complex queries with multiple relation instances

      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
        SIGMOD '08: Proceedings of the 2008 ACM SIGMOD international conference on Management of data
        June 2008
        1396 pages
        ISBN:9781605581026
        DOI:10.1145/1376616

        Copyright © 2008 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: 9 June 2008

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate785of4,003submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader