Statistics timing is an attribute associated with a connection that you turn on and off by using the SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING system procedure. Statistics timing is turned off by default. Turn statistics timing on only when the runtimestatistics attribute is already on. Turning statistics timing on when the runtimestatistics attribute is off has no effect.
Turn statistics timing on by calling this procedure with a non-zero argument. Turn statistics timing off by calling the procedure with a zero argument.
When statistics timing is turned on, Derby tracks the timings of various aspects of the execution of a statement. This information is included in the information returned by the SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS system function. When statistics timing is turned off, the SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS system function shows all timing values as zero.
SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(IN SMALLINT ENABLE)
By default, all users have execute privileges on this procedure.
To turn the runtimestatistics attribute and then the statistics timing attribute on:
CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1);