SYSCS_UTIL.SYSCS_SET_XPLAIN_MODE system procedure

When runtime statistics are being captured, you can control the mode of processing using this procedure. When the xplain mode is set to 1, statements are compiled and optimized, but not executed; when the xplain mode is set to 0 (the default), statements are compiled, optimized, and executed normally.

Note that xplain_mode only matters when xplain style has been enabled, see the SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA system procedure for more information.

See "Working with RunTimeStatistics" in the Tuning Derby for additional information.

Syntax

SYSCS_UTIL.SYSCS_SET_XPLAIN_MODE(IN SMALLINT NOEXECUTE)

Example

To let Derby explain a statement without executing it:

        call syscs_util.syscs_set_runtimestatistics(1);
        call syscs_util.syscs_set_xplain_schema('STATS');
        call syscs_util.syscs_set_xplain_mode(1);

        select country from countries;

        call syscs_util.syscs_set_runtimestatistics(0);
        call syscs_util.syscs_set_xplain_schema('');
        call syscs_util.syscs_set_xplain_mode(0);