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

Plan space analysis: an early warning system to detect plan regressions in cost-based optimizers

Published:13 June 2011Publication History

ABSTRACT

Plan regressions pose a significant problem in commercial database systems: Seemingly innocuous changes to a query optimizer component such as the cost model or the search strategy in order to enhance optimization results may result in unexpected and detrimental changes to previously satisfactory query plans.

Database vendors spend substantial resources on quality assurance to guard against this very issue, yet, testing for plan regressions in optimizers has proven hard and inconclusive. This is due to the nature of the problem: the optimizer chooses a single plan---Best Plan Found (bpf)---from a search space of literally up to hundreds of millions of different plan alternatives. It is standard practice to use a known good bpf and test for changes to this plan, i. e., ensure that no changes have occurred. However, in the vast majority of cases the bpf is not be affected by a code-level change, even though the change is known to affect many plans in the search space.

In this paper, we propose a holistic approach to address this issue. Instead of focusing on test suites consisting of BPFS we take the entire search space into account. We introduce a metric to assess the optimizer's accuracy across the entire search space.

We present preliminary results using a commercial database system, demonstrate the usefulness of our methodology with a standard benchmark, and illustrate how to build such an early warning system.

References

  1. R. Ahmed. Query Processing in Oracle DBMS. In Proc. Int'l. Workshop on Data Warehousing and OLAP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Elhemali and L. Giakoumakis. Unit Testing Query Transformation Rules. In Proc. Int'l. Workshop on Database Testing (DBTest), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. G. Elmongui, V. Narasayya, and R. Ramamurthy. A Framework for Testing Query Transformation Rules. In Proc. Int'l. Conf. ACM SIGMOD, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. Giakoumakis and C. Galindo-Legaria. Testing SQL Servers Query Optimizer: Challenges, Techniques and Experiences. IEEE Data Engineering Bulletin, 31(1), 2008.Google ScholarGoogle Scholar
  5. G. Graefe, A.-C. König, H. Kuno, V. Markl, and K.-U. Sattler. Robust Query Processing. Technical Report Workshop 10381, Dagstuhl, 2010.Google ScholarGoogle Scholar
  6. J. S. Maritz. Distribution-Free Statistical Methods. Chapman & Hall, 1981.Google ScholarGoogle ScholarCross RefCross Ref
  7. N. Reddy and J. Haritsa. Analyzing Plan Diagrams of Database Query Optimizers. In Proc. Int'l. Conf. on Very Large Databases, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. F. Waas and C. A. Galindo-Legaria. Counting, Enumerating, and Sampling of Execution Plans in a Cost-Based Query Optimizer. In Proc. Int'l. Conf. ACM SIGMOD, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Plan space analysis: an early warning system to detect plan regressions in cost-based optimizers

      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
        DBTest '11: Proceedings of the Fourth International Workshop on Testing Database Systems
        June 2011
        51 pages
        ISBN:9781450306553
        DOI:10.1145/1988842

        Copyright © 2011 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: 13 June 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate31of56submissions,55%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader