dft_queryopt - Default query optimization class configuration parameter

The query optimization class is used to direct the optimizer to use different degrees of optimization when compiling SQL and XQuery queries. This parameter provides additional flexibility by setting the default query optimization class used when neither the SET CURRENT QUERY OPTIMIZATION statement nor the QUERYOPT option on the BIND command are used.
Configuration type
Parameter type
  • Configurable online
  • Configurable by member in a Db2® pureScale® environment
Propagation class
Default [range]
5 [ 0 - 9 ]
Note: The default value is subject to change by the Db2 Configuration Advisor after initial database creation.
Unit of measure
Query Optimization Class (see the following list)
The query optimization classes currently defined are:
  • 0 - minimal query optimization.
  • 1 - roughly comparable to Db2 Version 1.
  • 2 - slight optimization.
  • 3 - moderate query optimization.
  • 5 - significant query optimization with heuristics to limit the effort expended on selecting an access plan. This is the default.
  • 7 - significant query optimization.
  • 9 - maximal query optimization