CACHES

The CACHES view displays information for all defined caches. The table below lists the columns that are associated with the CACHES view:
Name
Type
Description
CATALOG_NAME
WVARCHAR(256) Not Null
Specifies the catalog containing the object being cached.
SCHEMA_NAME
WVARCHAR(256) Not Null
Specifies the schema containing the object being cached.
OBJECT_NAME
WVARCHAR(256) Not Null
Specifies the name of the object being cached.
CACHE_STATUS
WCHAR(1) Not Null
Specifies the current status of the cache:
E – An ERROR row indicates that the last operation failed - there should only ever be one ERROR row (or 0 if the last command succeeded).
D - A DEFERRED row indicates that the last operation was specified as DEFERRED and has not yet been successfully refreshed - there should only ever be one DEFERRED row (or 0 if the view was successfully refreshed).
A – An ACTIVE row indicates that valid or complete cache data for the object exists, and is available for use. New users should always "see" the ACTIVE row with the latest timestamp. Old ACTIVE rows will go away as their user's pending transactions end. At start-up, only the newest ACTIVE row will remain.
S - SUSPENDED indicates that a cache has been disabled.
START_TS
TIMESTAMP Nullable
Specifies when the refresh cache operation began.
END_TS
TIMESTAMP Nullable
Specifies when the refresh cache operation completed.
MESSAGE_ID
INTEGER Nullable
Shows any message generated when the cache was defined or refreshed. (See the MESSAGES.
NUM_ROWS
BIGINT Nullable
Specifies the number of rows inserted into the data cache table. Note that this should be considered a rough estimate.
NUM_BYTES
BIGINT Nullable
Specifies the number of bytes inserted into the data cache table. Note that this should be considered a rough estimate.
USER_NAME
WVARCHAR(256)
Shows the user who performed the CREATE CACHE or REFRESH cache operation that caused this row.
Note: Only FedSQL views with definer's rights can be cached.
Here are the status rules regarding rows in the CACHES table:
  • The most recent row for a cache is returned, no matter the status.
  • If the most recent row was Active, that should be the only row returned.
  • If the most recent row was Deferred or Error, the next most recent Active row is returned if one exists.
Last updated: March 6, 2018