ACM Home Page
Please provide us with feedback. Feedback
Dynamic plan generation for parameterized queries
Full text PdfPdf (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
ACM: Association for Computing Machinery
SIGMOD: ACM Special Interest Group on Management of Data
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 40,   Downloads (12 Months): 146,   Citation Count: 0
Additional Information:

abstract   references   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/1559845.1559946
What is a DOI?

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
10
 
11
TPC-H specification -- Transaction Performance Council www.tpc.org

Collaborative Colleagues:
Ahmad Ghazal: colleagues
Dawit Seid: colleagues
Bhashyam Ramesh: colleagues
Alain Crolotte: colleagues
Manjula Koppuravuri: colleagues
Vinod G: colleagues