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. See "Configuring user authentication" and
"Configuring user authorization" in the
for more information.
The table has the columns shown in the following table.
Columns in the SYSCS_DIAG.STATEMENT_CACHE table
For the columns in the SYSCS_DIAG.STATEMENT_CACHE table, this table provides its data type, its length in bytes, whether it is nullable, and a description of its contents.
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
).