CURRENT OPTIMIZATION HINT special register
CURRENT OPTIMIZATION HINT specifies the user-defined optimization hint that Db2 should use to generate the access path for dynamic statements.
The data type is VARCHAR(128).
The value of the register identifies the rows in owner.PLAN_TABLE that Db2 uses to generate the access path. Db2 uses information in the rows in owner.PLAN_TABLE for which the value of the OPTHINT column matches the value of the CURRENT OPTIMIZATION special register. If the value of the register is an empty string or all blanks, Db2 uses normal optimization and ignores optimization hints. If the value of the register includes any non-blank characters and Db2 was installed without optimization hints enabled (field OPTIMIZATION HINTS on installation panel DSNTIP8), a warning occurs.
SET CURRENT OPTIMIZATION HINT = :NOHYB