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

Variance aware optimization of parameterized queries

Published:06 June 2010Publication History

ABSTRACT

Parameterized queries are commonly used in database applications. In a parameterized query, the same SQL statement is potentially executed multiple times with different parameter values. In today's DBMSs the query optimizer typically chooses a single execution plan that is reused for multiple instances of the same query. A key problem is that even if a plan with low average cost across instances is chosen, its variance can be high, which is undesirable in many production settings. In this paper, we describe techniques for selecting a plan that can better address the trade-off between the average and variance of cost across instances of a parameterized query. We show how to efficiently compute the skyline in the average-variance cost space. We have implemented our techniques on top of a commercial DBMS. We present experimental results on benchmark and real-world decision support queries.

References

  1. Babcock, B. et al. Towards a Robust Query Optimizer: A Principled and Practical Approach. SIGMOD 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bizarro, P., Bruno, N., DeWitt, D. J. Progressive Parametric Query Optimization. IEEE TKDE g. 21, 4 (2009), 582--594. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Borzsonyi, S., Kossmann, D., Stocker, K. The skyline operator. ICDE 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Chaudhuri, S. Query optimizers: time to rethink the contract? SIGMOD 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Chaudhuri, S. et al. Primitives for Workload Summarization and Implications for SQL. VLDB 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Chaudhuri, S., Narasayya, V. Program for TPC-D Data Generation with skew. ftp://ftp.research.microsoft.com/users/viveknar/TPCDSkew/Google ScholarGoogle Scholar
  7. Chu, F., Halpern, J. Y., Gehrke, J. Least Expected Cost Query Optimization: What Can We Expect? PODS 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Chu, F., Halpern, J. Y., Seshadri, P. Least Expected Cost Query Optimization: An Exercise in Utility. PODS 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. DB2. Optimizer profiles and guideline overview. http://publib.boulder.ibm.com/Google ScholarGoogle Scholar
  10. Deshpande, A. et al. Adaptive Query Processing. Foundations and Trends in Databases. 1, 1 (2007), 1--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dey, A. et al. Efficiently Approximating Query Optimizer Plan Diagrams. PVLDB 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ghosh, A. et al. Plan Selection based on Query clustering. VLDB 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Hutchison, D. et al. Multiobjective Optimization: Interactive and Evolutionary Approaches. Springer, 2008.Google ScholarGoogle Scholar
  14. Ioannidis, E. et al. Optimal histograms for limiting worst-case error propagation in the size of join results. TODS 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ioannidis, Y. E., Ng, R. T., Shim, K., Sellis, T. K. Parametric query optimization. The VLDB Journal (1997) 6, 132--151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Oracle. Using Query Hints. http://www.oracle.comGoogle ScholarGoogle Scholar
  17. Qiao, L. et al. Main-Memory Scan Sharing For Multi-Core CPUs. PVLDB 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Raman, V. et al. Constant-Time Query Processing. ICDE'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Reddy, N., Haritsa, J. R. Analyzing Plan Diagrams of Database Query Optimizers. VLDB 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. SQL Server Books Online, Hints (Transact-SQL). 2009. http://technet.microsoft.com/en-us/library/ms187713.aspxGoogle ScholarGoogle Scholar
  21. TPC-H Benchmark. http://www.tpc.org/tpch/Google ScholarGoogle Scholar
  22. Unterbrunner, U. et al. Predictable Performance for Unpredictable Workloads. In PVLDB 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Variance aware optimization of parameterized queries

      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 '10: Proceedings of the 2010 ACM SIGMOD International Conference on Management of data
        June 2010
        1286 pages
        ISBN:9781450300322
        DOI:10.1145/1807167

        Copyright © 2010 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: 6 June 2010

        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