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.
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.
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). |