Optimizer plan change management: improved stability and performance in Oracle 11g

Execution plans for SQL statements have a significant impact on the overall performance of database systems. New optimizer statistics, configuration parameter changes, software upgrades and hardware resource utilization are among a multitude of factors that may cause the query optimizer to generate new plans. While most of these plan changes are beneficial or benign, a few rogue plans can potentially wreak havoc on system performance or availability, affecting critical and time-sensitive business application needs. The normally desirable ability of a query optimizer to adapt to system changes may sometimes cause it to pick a sub-optimal plan compromising the stability of the system. In this paper, we present the new SQL Plan Management feature in Oracle 11g. It provides a comprehensive solution for managing plan changes to provide stable and optimal performance for a set of SQL statements. Two of its most important goals are preventing sub-optimal plans from being executed while allowing new plans to be used if they are verifiably better than previous plans. This feature is tightly integrated with Oracle's query optimizer. SQL Plan Management is available to users via both command-line and graphical interfaces. We describe the feature and then, using an industrial-strength application suite, present experimental results that show that SQL Plan Management provides stable and optimal performance for SQL statements with no performance regressions.

[1]  Benoît Dageville,et al.  Oracle's SQL Performance Analyzer , 2008, IEEE Data Eng. Bull..

[2]  Gennady Antoshenkov,et al.  Dynamic optimization of index scans restricted by Booleans , 1996, Proceedings of the Twelfth International Conference on Data Engineering.

[3]  Lin Qiao,et al.  A framework for enforcing application policies in database systems , 2007, SIGMOD '07.

[4]  Timos K. Sellis,et al.  Parametric query optimization , 1992, The VLDB Journal.

[5]  Zachary G. Ives,et al.  Efficient query processing for data integration , 2002 .

[6]  Hamid Pirahesh,et al.  Robust query processing through progressive optimization , 2004, SIGMOD '04.

[7]  Volker Markl,et al.  LEO - DB2's LEarning Optimizer , 2001, VLDB.

[8]  Goetz Graefe,et al.  Optimization of dynamic query evaluation plans , 1994, SIGMOD '94.

[9]  Mohamed Ziauddin,et al.  Query processing and optimization in Oracle Rdb , 1996, The VLDB Journal.

[10]  Benoît Dageville,et al.  Efficient and scalable statistics gathering for large databases in Oracle 11g , 2008, SIGMOD Conference.

[11]  Volker Markl,et al.  Learning table access cardinalities with LEO , 2002, SIGMOD '02.

[12]  Benoît Dageville,et al.  Automatic SQL Tuning in Oracle 10g , 2004, VLDB.

[13]  Volker Markl,et al.  LEO: An autonomic query optimizer for DB2 , 2003, IBM Syst. J..

[14]  Laurent Amsaleg,et al.  Cost-based query scrambling for initial delays , 1998, SIGMOD '98.

[15]  David J. DeWitt,et al.  Efficient mid-query re-optimization of sub-optimal query execution plans , 1998, SIGMOD '98.