| Dynamic plan generation for parameterized queries |
| Full text |
Pdf
(502 KB)
|
Source
|
International Conference on Management of Data
archive
Proceedings of the 35th SIGMOD international conference on Management of data
table of contents
Providence, Rhode Island, USA
SESSION: Industrial session 4: advances in query optimization
table of contents
Pages 909-916
Year of Publication: 2009
ISBN:978-1-60558-551-2
|
|
Authors
|
|
Ahmad Ghazal
|
Teradata Corporation, Elsegundo, CA, USA
|
|
Dawit Seid
|
Teradata Corporation, Elsegundo, CA, USA
|
|
Bhashyam Ramesh
|
Teradata, Hyderabad, India
|
|
Alain Crolotte
|
Teradata, Elsegundo, CA, USA
|
|
Manjula Koppuravuri
|
Teradata, Hyderabad, India
|
|
Vinod G
|
Teradata, Hyderabad, India
|
|
| Sponsors |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 40, Downloads (12 Months): 146, Citation Count: 0
|
|
|
ABSTRACT
Query processing in a DBMS typically involves two distinct phases: compilation, which generates the best plan and its corresponding execution steps, and execution, which evaluates these steps against database objects. For some queries, considerable resource savings can be achieved by skipping the compilation phase when the same query was previously submitted and its plan was already cached. In a number of important applications the same query, called a Parameterized Query (PQ), is repeatedly submitted in the same basic form but with different parameter values. PQ's are extensively used in both data update (e.g. batch update programs) and data access queries. There are tradeoffs associated with caching and re-using query plans such as space utilization and maintenance cost. Besides, pre-compiled plans may be suboptimal for a particular execution due to various reasons including data skew and inability to exploit value-based query transformation like materialized view rewrite and unsatisfiable predicate elimination. We address these tradeoffs by distinguishing two types of plans for PQ's: generic and specific plans. Generic plans are pre-compiled plans that are independent of the actual parameter values. Prior to execution, parameter values are plugged in to generic plans. In specific plans, parameter values are plugged prior to the compilation phase. This paper provides a practical framework for dynamically deciding between specific and generic plans for PQ's based on a mix of rule and cost based heuristics which are implemented in the Teradata 12.0 DBMS.
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
|
IBM. "DB2 Version 9.1 for z/OS: Application Programming and SQL Guide", December 2008.
|
| |
4
|
|
 |
5
|
|
| |
6
|
|
| |
7
|
A. Marathe and S. Scott, "Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005", Microsoft White Paper, Dec. 2006.
|
| |
8
|
|
 |
9
|
Volker Markl , Vijayshankar Raman , David Simmen , Guy Lohman , Hamid Pirahesh , Miso Cilimdzic, Robust query processing through progressive optimization, Proceedings of the 2004 ACM SIGMOD international conference on Management of data, June 13-18, 2004, Paris, France
[doi> 10.1145/1007568.1007642]
|
 |
10
|
|
| |
11
|
TPC-H specification -- Transaction Performance Council www.tpc.org
|
|