SYSCS_DIAG.STATEMENT_CACHE diagnostic table

The SYSCS_DIAG.STATEMENT_CACHE diagnostic table shows the contents of the SQL statement cache. You can reference the SYSCS_DIAG.STATEMENT_CACHE diagnostic table directly in a statement.

For example:
SELECT * FROM SYSCS_DIAG.STATEMENT_CACHE

For a database for which authentication and SQL authorization are both enabled, only the database owner can access this diagnostic table.

The table has the columns shown in the following table.

Table 1. Columns in the SYSCS_DIAG.STATEMENT_CACHE table
Column Name Type Length Nullable Contents
ID CHAR 36 false The internal identifier of the compiled statement.
SCHEMANAME VARCHAR 128 true The schema the statement was compiled in.
SQL_TEXT VARCHAR 32,672 false The text of the statement.
UNICODE BOOLEAN 1 false Always true
VALID BOOLEAN 1 false true (the statement is currently valid)

false (the statement is not currently valid)

COMPILED_AT TIMESTAMP 29 true The time the statement was compiled. Requires statistics timing to be enabled (see SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING system procedure).
Related reference
SYSCS_DIAG.CONTAINED_ROLES diagnostic table function
SYSCS_DIAG.ERROR_LOG_READER diagnostic table function
SYSCS_DIAG.ERROR_MESSAGES diagnostic table
SYSCS_DIAG.LOCK_TABLE diagnostic table
SYSCS_DIAG.SPACE_TABLE diagnostic table function
SYSCS_DIAG.STATEMENT_DURATION diagnostic table function
SYSCS_DIAG.TRANSACTION_TABLE diagnostic table