Exact cardinality query optimization for optimizer testing
Authors:
- Surajit ChaudhuriSCSurajit Chaudhuri
- Vivek NarasayyaVNVivek Narasayya
- Ravi RamamurthyRRRavi Ramamurthy
Open Access
- 1 August 2009
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the VLDB Endowment
- Vol. 2 (1) , 994-1005
Abstract
The accuracy of cardinality estimates is crucial for obtaining a good query execution plan. Today's optimizers make several simplifying assumptions during cardinality estimation that can lead to large errors and hence poor plans. In a scenario such as query optimizer testing it is very desirable to obtain the "best" plan, i.e., the plan produced when the cardinality of each relevant expression is exact. Such a plan serves as a baseline against which plans produced by using the existing cardinality estimation module in the query optimizer can be compared. However, obtaining all exact cardinalities by executing appropriate subexpressions can be prohibitively expensive. In this paper, we present a set of techniques that makes exact cardinality query optimization a viable option for a significantly larger set of queries than previously possible. We have implemented this functionality in Microsoft SQL Server and we present results using the TPC-H benchmark queries that demonstrate their effectiveness.Keywords
This publication has 13 references indexed in Scilit:
- Adaptive Query ProcessingFoundations and Trends® in Databases, 2007
- Collecting and Maintaining Just-in-Time Statistics2007
- Robust query processing through progressive optimization2004
- Database Tuning Advisor for Microsoft SQL Server 20052004
- Pipelining in multi-query optimizationJournal of Computer and System Sciences, 2003
- Automating statistics management for query optimizersIEEE Transactions on Knowledge and Data Engineering, 2001
- Efficient and extensible algorithms for multi query optimization2000
- Efficient mid-query re-optimization of sub-optimal query execution plans1998
- On the propagation of errors in the size of join results1991
- Multiple-query optimizationACM Transactions on Database Systems, 1988