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

Automatic plan choice validation using performance statistics

Published:13 June 2008Publication History

ABSTRACT

The query optimizer models data distribution and access paths to make the optimal plan choice for a given query. Sometimes the plan selection is poor because of modeling limitations, outdated statistics, incorrect optimization heuristics, etc. Hence it is useful to examine the plan choice made by the optimizer from an execution perspective and to impose validation rules on the actual execution plan to evaluate plan suitability. This approach treats the optimizer as a black box. The plan validation is based on the queries and data instead of the optimizer implementation details.

This paper describes {XPC}, a rule-based tool for Microsoft SQL Server [1] that helps users and developers achieve a better understanding of plan performance. We apply ideas similar to code profilers [2] to examine plan execution performance along with heuristic rules to the actual execution profile and probe for inefficiencies. This paper describes the overview and implementation of {XPC} and presents rules showing how {XPC} is useful in targeting plan performance issues.

References

  1. Microsoft SQL Server http://www.microsoft.com/sqlGoogle ScholarGoogle Scholar
  2. T. Ball and J. R. Larus. Optimally profiling and tracing programs. ACM SIGPLAN, 32, 5 (May 1997), 85--96 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Giakoumakis and C. Galindo-Legaria. Testing SQL Server's Query Optimizer: Challenges, Techniques and Experiences. IEEE Bulletin of the Technical Committee on Data Engineering, 31, 1 (March 2008), 37--44Google ScholarGoogle Scholar
  4. M. Stiller, G. Lohman, V. Markl, and M. Kandil. LEO-DB2's Learning Optimizer. In Proceedings of VLDB 2001, 19--28 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Chaudhuri, V. Narasayya, and R. Ramamurthy. Diagnosing Estimation Errors in Page Counts Using Execution Feedback. In Proceedings of ICDE 2008 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. K. Kline and C. Fernandez, Microsoft T-SQL Performance Tuning http://www.quest.com/Quest_Site_Assets/WhitePapers/WPD_MST-SQLPerformTuningPart4_F.pdfGoogle ScholarGoogle Scholar
  7. Extensible Markup Language (XML) http://www.w3.org/XML/Google ScholarGoogle Scholar
  8. XML Showplans http://msdn2.microsoft.com/en-us/library/ms189298.aspxGoogle ScholarGoogle Scholar
  9. W3C XML Query (XQuery) http://www.w3.org/XML/Query/Google ScholarGoogle Scholar
  10. SQL Server 2005 Books Online, Transact-SQL Reference (Transact-SQL), September 2007 http://msdn2.microsoft.com/en-us/library/ms189826.aspxGoogle ScholarGoogle Scholar
  11. SQL Server 2005 Books Online, Dynamic Management Views and Functions, September 2007 http://msdn2.microsoft.com/en-us/library/ms188754.aspx\Google ScholarGoogle Scholar
  12. SQL Server 2005 Books Online, Using XML in SQL Server, September 2007 http://msdn.microsoft.com/en-us/library/ms190936.aspxGoogle ScholarGoogle Scholar
  13. SQL Server 2008 Books Online, Query Processing Enhancements on Partitioned Tables and Indexes, February 2008, http://msdn.microsoft.com/en-us/library/ms345599(SQL.100).aspxGoogle ScholarGoogle Scholar
  14. Microsoft SQL Server 9.0 Technical Articles, Partitioned Tables and Indexes in SQL Server 2005, http://msdn.microsoft.com/en-us/library/ms345146.aspxGoogle ScholarGoogle Scholar
  15. SQL Server 2005 XML Showplan Schema, http://schemas.microsoft.com/sqlserver/2004/07/showplan/showplanxml.xsd.Google ScholarGoogle Scholar
  16. Bart Duncan's SQL Weblog, Wide vs. Narrow Plans, http://blogs.msdn.com/bartd/archive/2006/07/27/680518.aspx.Google ScholarGoogle Scholar

Index Terms

  1. Automatic plan choice validation using performance statistics

                    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 '08: Proceedings of the 1st international workshop on Testing database systems
                      June 2008
                      74 pages
                      ISBN:9781605582337
                      DOI:10.1145/1385269

                      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: 13 June 2008

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • research-article

                      Acceptance Rates

                      Overall Acceptance Rate31of56submissions,55%
                    • Article Metrics

                      • Downloads (Last 12 months)3
                      • Downloads (Last 6 weeks)0

                      Other Metrics

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader