ACM Home Page
Please provide us with feedback. Feedback
Counting, enumerating, and sampling of execution plans in a cost-based query optimizer
Full text PdfPdf (471 KB)
Source ACM SIGMOD Record archive
Volume 29 ,  Issue 2  (June 2000) table of contents
Pages: 499 - 509  
Year of Publication: 2000
ISSN:0163-5808
Also published in ...
Authors
Florian Waas  CWI, P.O. Box 94079, 1090 GB Amsterdam & Microsoft Corporation, One Microsoft Way, Redmond, WA
César Galindo-Legaria  Microsoft Corporation, One Microsoft Way, Redmond, WA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 73,   Citation Count: 5
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/335191.335451
What is a DOI?

ABSTRACT

Testing an SQL database system by running large sets of deterministic or stochastic SQL statements is common practice in commercial database development. However, code defects often remain undetected as the query optimizer's choice of an execution plan is not only depending on the query but strongly influenced by a large number of parameters describing the database and the hardware environment. Modifying these parameters in order to steer the optimizer to select other plans is difficult since this means anticipating often complex search strategies implemented in the optimizer.

In this paper we devise algorithms for counting, exhaustive generation, and uniform sampling of plans from the complete search space. Our techniques allow extensive validation of both generation of alternatives, and execution algorithms with plans other than the optimized one—if two candidate plans fail to produce the same results, then either the optimizer considered an invalid plan, or the execution code is faulty. When the space of alternatives becomes too large for exhaustive testing, which can occur even with a handful of joins, uniform random sampling provides a mechanism for unbiased testing.

The technique is implemented in Microsoft's SQL Server, where it is an integral part of the validation and testing process.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
 
3
G. Graefe. The Cascades Framework for Query Optimization. IEEE Data Engineering Bulletin, 18(3):19-29, September 1995.
4
 
5
6
 
7
 
8
 
9
 
10
R. Ruskey and T. C. Hu. Generating Binary Tree Lexicographically. SIAM Journal of Computation, 6(4):745-758, December 1977.
 
11


Collaborative Colleagues:
Florian Waas: colleagues
César Galindo-Legaria: colleagues