SQL is the Application Programming Interface (API) used to view, monitor, and change the cache and the cache configuration. Therefore, cache administration, configuration, and dynamic SQL cache monitoring is available in any environment that supports CA IDMS SQL, such as IDMSBCF, OCF, CA IDMS Visual DBA, and the CA IDMS SQL programs, among others.
This section describes three table procedures and one view of the SYSCA tables defined for dynamic SQL cache management.
The DSCCACHEOPT table manages the SQL cache options.
|
Column |
Data Type |
Description |
|---|---|---|
|
CACHEMAXCNT |
INTEGER |
The maximum number of entries that the cache can contain. |
|
DEFAULT |
CHAR(4) |
Default for caching: ON/OFF. This specifies if caching is enabled or disabled for any connect name that does not appear in the EXCEPTCON column. |
|
EXCEPTCNT |
INTEGER |
Count of rows in the DSCCACHEOPT relation with non-NULL value for the EXCEPTON column, in other words, the number of connect names in the list of exceptions. |
|
EXCEPTCON |
CHAR(8) |
Connect name that forms an exception to the default caching. |
Note the following:
The DSCCACHECTRL table controls SQL caching.
|
Column |
Data Type |
Description |
|---|---|---|
|
REQUEST |
CHAR |
Future use |
|
STATUS |
CHAR |
Future use |
|
CACHEMAXCNT |
INTEGER |
Maximum count of entries |
|
CACHECURCNT |
INTEGER |
Current count of entries used |
|
CURRENT |
INTEGER |
Current entry |
|
OLDEST |
INTEGER |
Oldest entry |
|
STORAGEUSEKB |
INTEGER |
Total storage used by the cache |
Note the following:
The DSCCACHE table represents the SQL cache. Each row is a cache entry.
|
Column |
Data Type |
Description |
|---|---|---|
|
KEY |
INTEGER |
Non-unique key |
|
LOCK |
BINARY(4) |
Lock word for access to entry |
|
DBNAME |
CHAR (8) |
DBName of SQL session |
|
DEFAULTSCHEMA |
CHAR (18) |
Default schema of session if statement contains at least one unqualified table reference |
|
USECNT |
INTEGER |
Usage count |
|
AGE |
INTEGER |
A value used to determine which entry to purge from a full cache when a new entry is inserted. The longer an entry remains in the cache without being used, the higher its age. |
|
COMPILECOST |
INTEGER |
Compilation cost |
|
ACCPLANSCANCOST |
FLOAT |
Cost of scan in access plan |
|
ACCPLANCPUCOST |
FLOAT |
Cost of CPU in access plan |
|
ACCPLANROWCNT |
FLOAT |
Count of rows in access plan |
|
EXECCOST |
INTEGER |
Cost of last execution of statement |
|
COMPILECNT |
INTEGER |
Count of (re)compilations |
|
COMPILESTAMP |
TIMESTAMP |
Timestamp of compilation |
|
STMTSIZE |
INTEGER |
Size of statement |
|
STATEMENT |
VARCHAR (8192) |
Statement |
|
SQLDIBSIZE |
INTEGER |
Size of SQLDIB |
|
SQLCMD |
INTEGER |
Type of SQL command |
|
SQLITCL |
INTEGER |
Combined Itree/TELL table length |
|
SQLARG |
INTEGER |
Bit flags for argument usage |
|
SQLOPT |
INTEGER |
Session options flags |
|
SQLTBL |
INTEGER |
Length of tuple buffer row |
|
SQLPBL |
INTEGER |
Length of parameter buffer |
|
SQLCID |
INTEGER |
Cursor identifier |
|
SQLSID |
INTEGER |
Section identifier |
|
SQLNM1 |
CHAR(32) |
Literal value 1 |
|
SQLNM2 |
CHAR(32) |
Literal value 2 |
|
SQLITL |
INTEGER |
Size of Itree |
|
SQLITBADDR |
BINARY(4) |
Address of Itree |
|
RTREESIZE |
INTEGER |
Size of Rtree |
|
RTREEOFFSET |
INTEGER |
Offset of Rtree for relocation purposes |
|
RTREEDOFAOFF |
INTEGER |
Offset of DOFA in Rtree |
|
RTREEADDR |
BINARY(4) |
Address of Rtree |
|
FIBSIZE |
INTEGER |
Size of FIB |
|
FIBADDR |
BINARY(4) |
Address of FIB |
|
FOPSIZE |
INTEGER |
Size of FOP |
|
GSTSIZE |
INTEGER |
Size of GST |
|
FOPADDR |
BINARY(4) |
Address of FOP |
|
LASTUSER |
CHAR(8) |
Reserved |
|
GLOBALCURSORNAME |
CHAR(18) |
Reserved |
|
FCRC |
BINARY(4) |
FCRC flags |
|
SQLDAADDR |
BINARY(4) |
Address of cached input SQLDA |
|
STORAGEUSED |
INTEGER |
Size in bytes of used storage |
Note the following:
The following acronyms are used in the previous table.
SYSCA.DSCCACHEV is created during installation. It defines a view on the SYSCA.DSCCACHE table procedure as follows:
create view SYSCA.DSCCACHEV as
select KEY, DBNAME, DEFAULTSCHEMA, USECNT, AGE
, COMPILECNT as "#C", compilestamp
, ACCPLANSCANCOST, ACCPLANCPUCOST
, ACCPLANROWCNT, FIBSIZE, FIBADDR
, SUBSTR(STATEMENT, 1, 72) as STMT1
from SYSCA.DSCCACHE;
You have the option to define your own views.
|
|
DSCCACHOPT |
DSCCACHECTRL |
DSCCACHE |
DSCCACHEV |
|---|---|---|---|---|
|
Type |
Table Procedure |
Table Procedure |
Table Procedure |
View |
|
SELECT |
X |
X |
X |
X |
|
INSERT |
X |
|
|
|
|
UPDATE |
X |
|
|
|
|
DELETE |
X |
X |
X |
X |
|
Copyright © 2014 CA.
All rights reserved.
|
|