SQL-J Language Reference
Page 51 of 121

SET STATISTICS TIMING statement

Statistics timing is an attribute associated with a connection that you turn on and off via the SET STATISTICS statement. Statistics timing is off by default. Turn statistics timing on only when RunTimeStatistics is already on (see SET RUNTIMESTATISTICS statement). Turning it on when RunTimeStatistics is off has no effect.

When statistics timing is turned on, Cloudscape tracks the timings of various aspects of the execution of a statement. This information is included in the COM.cloudscape.types.RunTimeStatistics object returned by RUNTIMESTATISTICS(). (See RUNTIMESTATISTICS().) Statistics timing is a separate attribute because the cost of obtaining system time may be relatively expensive. When statistics timing is off, RUNTIMESTATISTICS() shows all timings as zeroes.

Syntax

SET STATISTICS TIMING { ON | OFF }

Example

SET RUNTIMESTATISTICS ON

SET STATISTICS TIMING ON