Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3183713.3183742acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

On the Calculation of Optimality Ranges for Relational Query Execution Plans

Published: 27 May 2018 Publication History

Abstract

Cardinality estimation is a crucial task in query optimization and typically relies on heuristics and basic statistical approximations. At execution time, estimation errors might result in situations where intermediate result sizes may differ from the estimated ones, so that the originally chosen plan is not the optimal plan anymore. In this paper we analyze the deviation from the estimate, and denote the cardinality range of an intermediate result, where the optimal plan remains optimal as the optimality range. While previous work used simple heuristics to calculate similar ranges, we generate the precise bounds for the optimality range considering all relevant plan alternatives. Our experimental results show that the fixed optimality ranges used in previous work fail to characterize the range of cardinalities where a plan is optimal. We derive theoretical worst case bounds for the number of enumerated plans required to compute the precise optimality range, and experimentally show that in real queries this number is significantly smaller. Our experiments also show the benefit for applications like Mid-Query Re-Optimization in terms of significant execution time improvement.

References

[1]
Shivnath Babu, Pedro Bizarro, and David DeWitt. 2005. Proactive Re-optimization. In Proceedings of the 2005 ACM SIGMOD International Conference on Management of Data (SIGMOD '05). ACM, New York, NY, USA.
[2]
Pedro Bizarro, Nicolas Bruno, and David J. DeWitt. 2009. Progressive Parametric Query Optimization. IEEE Transactions on Knowledge and Data Engineering Vol. 21, 4 (April. 2009).
[3]
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein . 2009. Introduction to Algorithms, Third Edition (bibinfoedition3rd ed.). The MIT Press.
[4]
Transaction Processing Performance Council. 2017. TPC Benchmark H (Decision Support) Standard Specification Revision 2.17.2. http://www.tpc.org. (2017).
[5]
Harish D, Pooja N. Darera, and Jayant R. Haritsa. 2007. On the Production of Anorexic Plan Diagrams. In Proceedings of the 33rd International Conference on Very Large Data Bases (VLDB '07). VLDB Endowment.
[6]
Harish D., Pooja N. Darera, and Jayant R. Haritsa. 2008. Identifying Robust Plans Through Plan Diagram Reduction. Proceedings of the VLDB Endowment Vol. 1, 1 (Aug. 2008).
[7]
David DeHaan and Frank Wm. Tompa. 2007. Optimal Top-down Join Enumeration. In Proceedings of the 2007 ACM SIGMOD International Conference on Management of Data (SIGMOD '07). ACM, New York, NY, USA.
[8]
Pit Fender and Guido Moerkotte. 2013. Counter Strike: Generic Top-down Join Enumeration for Hypergraphs. Proc. VLDB Endow. Vol. 6, 14 (Sept. 2013).
[9]
Goetz Graefe and William J. McKenna. 1993. The Volcano Optimizer Generator: Extensibility and Efficient Search Proceedings of the Ninth International Conference on Data Engineering. IEEE Computer Society, Washington, DC, USA.
[10]
Arvind Hulgeri and S. Sudarshan. 2002. Parametric Query Optimization for Linear and Piecewise Linear Cost Functions Proceedings of the 28th International Conference on Very Large Data Bases (VLDB '02). VLDB Endowment.
[11]
Navin Kabra and David J. DeWitt. 1998. Efficient Mid-query Re-optimization of Sub-optimal Query Execution Plans Proceedings of the 1998 ACM SIGMOD International Conference on Management of Data (SIGMOD '98). ACM, New York, NY, USA.
[12]
Alfons Kemper and Thomas Neumann. 2011. HyPer: A Hybrid OLTP&OLAP Main Memory Database System Based on Virtual Memory Snapshots. In Proceedings of the 2011 IEEE 27th International Conference on Data Engineering (ICDE '11). IEEE Computer Society, Washington, DC, USA.
[13]
Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2015. How Good Are Query Optimizers, Really? Proceedings of the VLDB Endowment Vol. 9, 3 (Nov. 2015).
[14]
Volker Markl, Vijayshankar Raman, David Simmen, Guy Lohman, Hamid Pirahesh, and Miso Cilimdzic. 2004. Robust Query Processing Through Progressive Optimization Proceedings of the 2004 ACM SIGMOD International Conference on Management of Data (SIGMOD '04). ACM, New York, NY, USA.
[15]
Norman May, Alexander Böhm, and Wolfgang Lehner. 2017. SAP HANA -- The Evolution of an In-Memory DBMS from Pure OLAP Processing Towards Mixed Workloads. In Datenbanksysteme für Business, Technologie und Web (BTW '17). Gesellschaft für Informatik, Bonn.
[16]
Guido Moerkotte. 2014. Building Query Compilers. (2014). deftempurl%http://pi3.informatik.uni-mannheim.de/moerkotte.html.en tempurl unpublished.
[17]
Guido Moerkotte and Thomas Neumann. 2008. Dynamic Programming Strikes Back. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data (SIGMOD '08). ACM, New York, NY, USA.
[18]
Kiyoshi Ono and Guy M. Lohman. 1990. Measuring the Complexity of Join Enumeration in Query Optimization Proceedings of the 16th International Conference on Very Large Data Bases (VLDB '90). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
[19]
Arjan Pellenkoft, César A. Galindo-Legaria, and Martin L. Kersten. 1997. The Complexity of Transformation-Based Join Enumeration Proceedings of the 23rd International Conference on Very Large Data Bases (VLDB '97). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
[20]
Iraklis Psaroudakis, Florian Wolf, Norman May, Thomas Neumann, Alexander Böhm, Anastasia Ailamaki, and Kai-Uwe Sattler. 2014. Scaling up Mixed Workloads: A Battle of Data Freshness, Flexibility, and Scheduling. In Technology Conference on Performance Evaluation and Benchmarking (TPCTC '14). Springer International Publishing.
[21]
P. Griffiths Selinger, M. M. Astrahan, D. D. Chamberlin, R. A. Lorie, and T. G. Price. 1979. Access Path Selection in a Relational Database Management System Proceedings of the 1979 ACM SIGMOD International Conference on Management of Data (SIGMOD '79). ACM, New York, NY, USA.
[22]
Michael Stillger, Guy M. Lohman, Volker Markl, and Mokhtar Kandil. 2001. LEO - DB2's LEarning Optimizer. In Proceedings of the 27th International Conference on Very Large Data Bases (VLDB '01). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
[23]
Shaoyi Yin, Abdelkader Hameurlain, and Franck Morvan. 2015. Robust Query Optimization Methods With Respect to Estimation Errors: A Survey. SIGMOD Record Vol. 44, 3 (Dec. 2015).

Cited By

View all
  • (2024)Robust Query Optimization in the Era of Machine Learning: State-of-the-Art and Future Directions2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00408(5371-5375)Online publication date: 13-May-2024
  • (2023)Efficient Query Re-optimization with Judicious Subquery SelectionsProceedings of the ACM on Management of Data10.1145/35893301:2(1-26)Online publication date: 20-Jun-2023
  • (2023)dbET: Execution Time Distribution-based Plan SelectionProceedings of the ACM on Management of Data10.1145/35887111:1(1-26)Online publication date: 30-May-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGMOD '18: Proceedings of the 2018 International Conference on Management of Data
May 2018
1874 pages
ISBN:9781450347037
DOI:10.1145/3183713
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 May 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. mid-query re-optimization
  2. optimality ranges
  3. parametric queries
  4. query optimization
  5. query plan caching
  6. query processing

Qualifiers

  • Research-article

Conference

SIGMOD/PODS '18
Sponsor:

Acceptance Rates

SIGMOD '18 Paper Acceptance Rate 90 of 461 submissions, 20%;
Overall Acceptance Rate 785 of 4,003 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)8
Reflects downloads up to 24 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Robust Query Optimization in the Era of Machine Learning: State-of-the-Art and Future Directions2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00408(5371-5375)Online publication date: 13-May-2024
  • (2023)Efficient Query Re-optimization with Judicious Subquery SelectionsProceedings of the ACM on Management of Data10.1145/35893301:2(1-26)Online publication date: 20-Jun-2023
  • (2023)dbET: Execution Time Distribution-based Plan SelectionProceedings of the ACM on Management of Data10.1145/35887111:1(1-26)Online publication date: 30-May-2023
  • (2023)Tempura: a general cost-based optimizer framework for incremental data processing (Journal Version)The VLDB Journal10.1007/s00778-023-00785-132:6(1315-1342)Online publication date: 20-Mar-2023
  • (2022)Algorithmization of repeated query optimization in cloud databases with the aid of computer trainingМОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ10.26102/2310-6018/2022.36.1.02010:1(36)(20-21)Online publication date: 25-Jan-2022
  • (2020)TempuraProceedings of the VLDB Endowment10.14778/3421424.342142714:1(14-27)Online publication date: 1-Sep-2020
  • (2018)Robustness metrics for relational query execution plansProceedings of the VLDB Endowment10.14778/3236187.323619111:11(1360-1372)Online publication date: 1-Jul-2018

View Options

Login options

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