skip to main content
research-article

Identifying robust plans through plan diagram reduction

Authors Info & Claims
Published:01 August 2008Publication History
Skip Abstract Section

Abstract

Estimates of predicate selectivities by database query optimizers often differ significantly from those actually encountered during query execution, leading to poor plan choices and inflated response times. In this paper, we investigate mitigating this problem by replacing selectivity error-sensitive plan choices with alternative plans that provide robust performance. Our approach is based on the recent observation that even the complex and dense "plan diagrams" associated with industrial-strength optimizers can be efficiently reduced to "anorexic" equivalents featuring only a few plans, without materially impacting query processing quality.

Extensive experimentation with a rich set of TPC-H and TPC-DS-based query templates in a variety of database environments indicate that plan diagram reduction typically retains plans that are substantially resistant to selectivity errors on the base relations. However, it can sometimes also be severely counter-productive, with the replacements performing much worse. We address this problem through a generalized mathematical characterization of plan cost behavior over the parameter space, which lends itself to efficient criteria of when it is safe to reduce. Our strategies are fully non-invasive and have been implemented in the Picasso optimizer visualization tool.

References

  1. A. Aboulnaga and S. Chaudhuri, "Self-tuning Histograms: Building Histograms without Looking at Data", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B. Babcock and S. Chaudhuri, "Towards a Robust Query Optimizer: A Principled and Practical Approach", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Babu, P. Bizarro and D. DeWitt, "Proactive Re-Optimization", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Babu, P. Bizarro and D. DeWitt, "Proactive Re-Optimization with Rio", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Bruno, "A Critical Look at the TAB Benchmark for Physical Design Tools", SIGMOD Record, 36(4), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. F. Chu, J. Halpern and P. Seshadri, "Least Expected Cost Query Optimization: An Exercise in Utility", Proc. of ACM Symp. on Principles of Database Systems (PODS), May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Dey, S. Bhaumik, Harish D. and J. Haritsa, "Efficiently Approximating Query Optimizer Plan Diagrams", Proc. of 34th Intl. Conf. on Very Large Data Bases (VLDB), August 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. F. Chu, J. Halpern and J. Gehrke, "Least Expected Cost Query Optimization: What Can We Expect", Proc. of ACM Symp. on Principles of Database Systems (PODS), May 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Deshpande, Z. Ives and V. Raman "Adaptive Query Processing", Foundations and Trends in Databases, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. U. Feige, "A threshold of In n for approximating set cover", Journal of ACM, 45(4), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Harish D., P. Darera and J. Haritsa, "On the Production of Anorexic Plan Diagrams", Proc. of 33rd Intl. Conf. on Very Large Data Bases (VLDB), September 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Harish D., P. Darera and J. Haritsa, "Robust Plans through Plan Diagram Reduction", Tech. Rep. TR-2007-02, DSL/SERC, Indian Inst. of Science, 2007. http://dsl.serc.iisc.ernet.in/publications/report/TR/TR-2007-02.pdfGoogle ScholarGoogle Scholar
  13. A. Hulgeri and S. Sudarshan, "Parametric Query Optimization for Linear and Piecewise Linear Cost Functions", Proc. of 28th Intl. Conf. on Very Large Data Bases (VLDB), August 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Hulgeri and S. Sudarshan, "AniPQO: Almost Non-intrusive Parametric Query Optimization for Nonlinear Cost Functions", Proc. of 29th Intl. Conf. on Very Large Data Bases (VLDB), September 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Y. Ioannidis and S. Christodoulakis, "On the Propagation of Errors in the Size of Join Results", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, May 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. N. Kabra and D. DeWitt, "Efficient Mid-Query Re-Optimization of Sub-Optimal Query Execution Plans", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, May 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. E. Kreyszig, Advanced Engineering Mathematics, New Age International, 5th ed, 1997.Google ScholarGoogle Scholar
  18. L. Mackert and G. Lohman, "R* Optimizer Validation and Performance Evaluation for Local Queries", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, May 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. V. Markl, V. Raman, D. Simmen, G. Lohman, H. Pirahesh and M. Cilimdzic, "Robust Query Processing through Progressive Optimization", Proc. of ACM SIGMOD Intl. Conf. on Management of Data, June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Patel, M. Carey and M. Vernon, "Accurate Modeling of the Hybrid Hash Join Algorithm", Proc. of ACM SIGMETRICS Intl. Conf. on Measurement and Modeling of Computer Systems, May 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Picasso Database Query Optimizer Visualizer, http://dsl.serc.iise.ernet.in/projects/PICASSO/picasso.htmlGoogle ScholarGoogle Scholar
  22. N. Reddy and J. Haritsa, "Analyzing Plan Diagrams of Database Query Optimizers", Proc. of 31st Intl. Conf. on Very Large Data Bases (VLDB), August 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Slavik, "A tight analysis of the greedy algorithm for set cover", Proc. of 28th ACM Symp. on Theory of Computing, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Stillger, G. Lohman, V. Markl and M. Kandil, "LEO -- DB2's LEarning Optimizer", Proc. of 27th Intl. Conf. on Very Large Data Bases (VLDB), September 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. MATLAB, http://www.mathworks.comGoogle ScholarGoogle Scholar
  26. http://www.tpc.org/tpchGoogle ScholarGoogle Scholar
  27. http://www.tpc.org/tpcdsGoogle ScholarGoogle Scholar
  28. http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com. ibm.db2.udb.admin.doc/doc/t0024533.htmGoogle ScholarGoogle Scholar
  29. http://msdn2.microsoft.com/en-us/library/ms189298.aspxGoogle ScholarGoogle Scholar
  30. http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase. dc34982_1500/html/mig_gde/BABIFCAF.htmGoogle ScholarGoogle Scholar

Index Terms

  1. Identifying robust plans through plan diagram reduction

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader