Optimizer Directives

The Optimizer Directives segment specifies keywords that you can use to partially or fully specify the query plan of the optimizer. Use this segment whenever you see a reference to Optimizer Directives in a syntax diagram.

Syntax

(1)
Optimizer Directives

1  --+ 
1 {+ 
1 /*+ 
1+ ,
1  %Access-Method Directives1
1  %Join-Order Directive2
1  %Join-Method Directives3
1  %Star-Join Directives4
1  %Optimization-Goal Directives5
1  %Explain-Mode Directives6
1  %Statement cache directive7
1 }
1  */ 

Usage

Use one or more optimizer directives to partially or fully specify the query plan of the optimizer. The scope of the directive is the current query only.

Directives are enabled by default. To obtain information about how specified directives are processed, view the output of the SET EXPLAIN statement. To disable directives, set the IFX_DIRECTIVES environment variable to 0, or set the DIRECTIVES parameter in the ONCONFIG file to 0.

The syntax diagram above is simplified, and does not show that the closing comment indicator must follow the same comment style as the opening comment indicator. For more information, see Optimizer Directives as Comments.