The CURRENT EXPLAIN MODE special register holds a VARCHAR(254) value which controls the behavior of the Explain facility with respect to eligible dynamic SQL statements. This facility generates and inserts Explain information into the Explain tables (for more information see the Administration Guide). This information does not include the Explain snapshot.
The possible values are YES, NO, EXPLAIN, RECOMMEND INDEXES and EVALUATE INDEXES. 19
The initial value is NO.
Its value can be changed by the SET CURRENT EXPLAIN MODE statement (see SET CURRENT EXPLAIN MODE for information on this statement).
The CURRENT EXPLAIN MODE and CURRENT EXPLAIN SNAPSHOT special register values interact when the Explain facility is invoked (see Table 142 for details). The CURRENT EXPLAIN MODE special register also interacts with the EXPLAIN bind option (see Table 143 for details). The values RECOMMEND INDEXES and EVALUATE INDEXES can only be set for the CURRENT EXPLAIN MODE register, and must be set using the SET CURRENT EXPLAIN MODE statement.
Example: Set the host variable EXPL_MODE (VARCHAR(254)) to the value currently in the CURRENT EXPLAIN MODE special register.
VALUES CURRENT EXPLAIN MODE INTO :EXPL_MODE