- To use the RUNTIMESTATISTICS attribute in ij,
turn on and off RUNTIMESTATISTICS using the SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS() system
procedure (see the Derby Reference Manual for more information):
-- turn on RUNTIMESTATISTICS for connection:
CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
-- execute complex query here -- step through the result set
-- access runtime statistics information:
VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
- Turn on statistics timing using the SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING system
procedure (see the Derby Reference Manual for more information).
If you do not turn on statistics timing, you will see the statement execution
plan only, and not the timing information.
CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1);
Although the syntax is different, the basic steps for working with
RUNTIMESTATISTICS are the same in a Java program.
If you are working in
ij, set the display
width to 5000 or another high number:
MaximumDisplayWidth 5000