Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Xplus: a SQL-tuning-aware query optimizer

Published: 01 September 2010 Publication History

Abstract

The need to improve a suboptimal execution plan picked by the query optimizer for a repeatedly run SQL query arises routinely. Complex expressions, skewed or correlated data, and changing conditions can cause the optimizer to make mistakes. For example, the optimizer may pick a poor join order, overlook an important index, use a nested-loop join when a hash join would have done better, or cause an expensive, but avoidable, sort to happen. SQL tuning is also needed while tuning multi-tier services to meet service-level objectives. The difficulty of SQL tuning can be lessened considerably if users and higher-level tuning tools can tell the optimizer: "I am not satisfied with the performance of the plan p being used for the query Q that runs repeatedly. Can you generate a (δ%) better plan?" This paper designs, implements, and evaluates Xplus which, to our knowledge, is the first query optimizer to provide this feature. Xplus goes beyond the traditional plan-first-execute-next approach: Xplus runs some (sub)plans proactively, collects monitoring data from the runs, and iterates. A nontrivial challenge is in choosing a small set of plans to run. Xplus guides this process efficiently using an extensible architecture comprising SQL-tuning experts with different goals, and a policy to arbitrate among the experts. We show the effectiveness of Xplus on real-life tuning scenarios created using TPC-H queries on a PostgreSQL database.

References

[1]
M. Andrei and P. Valduriez. User-Optimizer Communication using Abstract Plans in Sybase ASE. In Proc. of VLDB '01. ACM, 2001.
[2]
G. Antoshenkov and M. Ziauddin. Query Processing and Optimization in Oracle Rdb. VLDB Journal, 5(4):229--237, 1996.
[3]
R. Avnur and J. M. Hellerstein. Eddies: Continuously Adaptive Query Processing. In Proc. of SIGMOD '00. ACM, 2000.
[4]
B. Babcock and S. Chaudhuri. Towards a Robust Query Optimizer: A Principled and Practical Approach. In Proc. of SIGMOD '05, 2005.
[5]
S. Babu, P. Bizarro, and D. DeWitt. Proactive Reoptimization. In Proc. of SIGMOD '05. ACM, 2005.
[6]
P. Belknap, B. Dageville, K. Dias, and K. Yagoub. Self-Tuning for SQL Performance in Oracle Database 11g. Intl. Conf. on Data Engineering, 2009.
[7]
N. Bruno, S. Chaudhuri, and R. Ramamurthy. Power Hints for Query Optimization. In Intl. Conf. on Data Engineering, 2009.
[8]
S. Chaudhuri, V. Narasayya, and R. Ramamurthy. A Pay-As-You-Go Framework for Query Execution Feedback. In Proc. of VLDB '08. VLDB Endowment, 2008.
[9]
C. M. Chen and N. Roussopoulos. Adaptive Selectivity Estimation using Query Feedback. SIGMOD Record, 23(2):161--172, 1994.
[10]
A. Deshpande, Z. G. Ives, and V. Raman. Adaptive Query Processing. Foundations and Trends in Databases, 1(1):1--140, 2007.
[11]
S. Duan, V. Thummala, and S. Babu. Tuning Database Configuration Parameters with iTuned. In Proc. of VLDB '09. ACM, 2009.
[12]
J. C. Gittins and D. M. Jones. A Dynamic Allocation Index for the Sequential Design of Experiments. Progress in Statistics (European Meeting of Statisticians), 1972.
[13]
G. Graefe and D. J. DeWitt. The EXODUS Optimizer Generator. In Proc. of SIGMOD '87. ACM, 1987.
[14]
P. J. Haas, I. F. Ilyas, G. M. Lohman, and V. Markl. Discovering and Exploiting Statistical Properties for Query Optimization in Relational Databases: A Survey. Statistical Analysis and Data Mining, 2009.
[15]
H. Herodotou and S. Babu. Automated SQL Tuning through Trial and (Sometimes) Error. In Proc. of DBTest '09. ACM, 2009.
[16]
IBM Corp. DB2 Information Center. http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp.
[17]
IBM DB2. Giving optimization hints to DB2, 2003. http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.perf/db2z_giveoptimizerhints.htm.
[18]
A. Kemper, G. Moerkotte, and K. Peithner. A Blackboard Architecture for Query Optimization in Object Bases. In Proc. of VLDB '93. ACM, 1993.
[19]
V. Markl, P. J. Haas, M. Kutsch, N. Megiddo, U. Srivastava, and T. M. Tran. Consistent Selectivity Estimation via Maximum Entropy. VLDB Journal, 16(1):55--76, 2007.
[20]
V. Markl, V. Raman, D. Simmen, G. Lohman, and H. Pirahesh. Robust Query Processing through Progressive Optimization. In Proc. of SIGMOD '04. ACM, 2004.
[21]
F. Olken and D. Rotem. Random Sampling from Databases: A Survey. Statistics and Computing, 5:25--42, 1995.
[22]
P. G. Selinger, M. M. Astrahan, D. D. Chamberlin, R. A. Lorie, and T. G. Price. Access Path Selection in a Relational Database Management System. In Proc. of SIGMOD '79. ACM, 1979.
[23]
M. Stillger, G. M. Lohman, V. Markl, and M. Kandil. LEO - DB2's Learning Optimizer. In Proc. of VLDB '01. Morgan Kaufmann Publishers Inc., 2001.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the VLDB Endowment
Proceedings of the VLDB Endowment  Volume 3, Issue 1-2
September 2010
1658 pages
ISSN:2150-8097
  • Editors:
  • Elisa Bertino,
  • Paolo Atzeni,
  • Kian Lee Tan,
  • Yi Chen,
  • Y. C. Tay
Issue’s Table of Contents

Publisher

VLDB Endowment

Publication History

Published: 01 September 2010
Published in PVLDB Volume 3, Issue 1-2

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Robust and budget-constrained encoding configurations for in-memory database systemsProceedings of the VLDB Endowment10.14778/3503585.350358815:4(780-793)Online publication date: 14-Apr-2022
  • (2021)A review on architecture and models for autonomic software systemsThe Journal of Supercomputing10.1007/s11227-020-03268-077:1(388-417)Online publication date: 1-Jan-2021
  • (2018)Plan stitchProceedings of the VLDB Endowment10.14778/3231751.323176111:10(1123-1136)Online publication date: 1-Jun-2018
  • (2018)Smooth ScanThe VLDB Journal — The International Journal on Very Large Data Bases10.1007/s00778-018-0507-827:4(521-545)Online publication date: 1-Aug-2018
  • (2016)DBSherlockProceedings of the 2016 International Conference on Management of Data10.1145/2882903.2915218(1599-1614)Online publication date: 26-Jun-2016
  • (2015)Robust Query Optimization Methods With Respect to Estimation ErrorsACM SIGMOD Record10.1145/2854006.285401244:3(25-36)Online publication date: 3-Dec-2015
  • (2013)Massively Parallel Databases and MapReduce SystemsFoundations and Trends in Databases10.1561/19000000365:1(1-104)Online publication date: 20-Nov-2013
  • (2012)PerfXplainProceedings of the VLDB Endowment10.14778/2180912.21809135:7(598-609)Online publication date: 1-Mar-2012
  • (2012)Efficient processing of top-k join queries by attribute domain refinementProceedings of the 16th East European conference on Advances in Databases and Information Systems10.1007/978-3-642-33074-2_24(318-331)Online publication date: 18-Sep-2012

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media