Returns information from a dynamic SQL snapshot. It replaces the SQLCACHE_SNAPSHOT function, which is still available for compatibility reasons.
The schema is SYSPROC.
If the null value is specified, -1 is set implicitly.
If both parameters are set to NULL, the snapshot will be taken only if a file has not previously been created by the SNAPSHOT_FILEW stored procedure for the corresponding snapshot API request type.
The function returns a table as shown in the following section.
Column name | Data type | Description or corresponding monitor element |
---|---|---|
SNAPSHOT_TIMESTAMP | TIMESTAMP | snapshot_timestamp - Snapshot timestamp |
ROWS_READ | BIGINT | rows_read - Rows read |
ROWS_WRITTEN | BIGINT | rows_written - Rows written |
NUM_EXECUTIONS | BIGINT | num_executions - Statement executions |
NUM_COMPILATIONS | BIGINT | num_compilations - Statement compilations |
PREP_TIME_WORST | BIGINT | prep_time_worst - Statement worst preparation time |
PREP_TIME_BEST | BIGINT | prep_time_best - Statement best preparation time |
INT_ROWS_DELETED | BIGINT | int_rows_deleted - Internal rows deleted |
INT_ROWS_INSERTED | BIGINT | int_rows_inserted - Internal rows inserted |
INT_ROWS_UPDATED | BIGINT | int_rows_updated - Internal rows updated |
STMT_SORTS | BIGINT | stmt_sorts - Statement sorts |
TOTAL_EXEC_TIME | BIGINT | total_exec_time - Elapsed statement execution time |
TOTAL_SYS_CPU_TIME | BIGINT | total_sys_cpu_time - Total system CPU for a statement |
TOTAL_USR_CPU_TIME | BIGINT | total_usr_cpu_time - Total user CPU for a statement |
STMT_TEXT | CLOB(16M)1 | stmt_text - SQL statement text |
1 STMT_TEXT is defined as CLOB(16M) to allow for future expansion only. Actual output of the statement text is truncated at 64K. |