The CURRENT EXPLAIN SNAPSHOT special register holds a CHAR(8) value which controls the behavior of the Explain snapshot facility. This facility generates compressed information including access plan information, operator costs, and bind-time statistics (for more information see the Administration Guide ).
Only the following statements consider the value of this register: DELETE, INSERT, SELECT, SELECT INTO, UPDATE, VALUES or VALUES INTO.
The possible values are YES, NO, and EXPLAIN. 20
The initial value is NO.
Its value can be changed by the SET CURRENT EXPLAIN SNAPSHOT statement (see SET CURRENT EXPLAIN SNAPSHOT).
The CURRENT EXPLAIN SNAPSHOT and CURRENT EXPLAIN MODE special register values interact when the Explain facility is invoked (see Table 142 for details). The CURRENT EXPLAIN SNAPSHOT special register also interacts with the EXPLSNAP bind option (see Table 144 for details).
Set the host variable EXPL_SNAP (char(8)) to the value currently in the CURRENT EXPLAIN SNAPSHOT special register.
VALUES CURRENT EXPLAIN SNAPSHOT INTO :EXPL_SNAP