DB2 10.5 for Linux, UNIX, and Windows

CURRENT OPTIMIZATION PROFILE special register

The CURRENT OPTIMIZATION PROFILE special register specifies the qualified name of the optimization profile to be used by DML statements that are dynamically prepared for optimization.

The initial value is the null value. The value can be changed by invoking the SET CURRENT OPTIMIZATION PROFILE statement. An optimization profile that is not qualified with a schema name will be implicitly qualified with the value of the CURRENT DEFAULT SCHEMA special register.

Example 1: Set the optimization profile to 'JON.SALES'.
   SET CURRENT OPTIMIZATION PROFILE = JON.SALES 
Example 2: Get the current value of the optimization profile name for this connection.
   VALUES (CURRENT OPTIMIZATION PROFILE) INTO :PROFILE