The onstat -g ssc command displays the number of times that the database server reads the SQL statement in the cache.
Unless UNSECURE_ONSTAT=1, only the DBSA can view onstat -g ssc syssqltrace information.
The command takes two options
Statement Cache Summary:
#lrus currsize maxsize Poolsize #hits nolimit
4 117640 524288 139264 0 1
Statement Cache Entries:
lru hash ref_cnt hits flag heap_ptr database user
----------------------------------------------------------------
0 262 0 7 -F aad8038 dbaudit waudit
INSERT INTO t9000audit ( c9000_char , c9000_short , c9000_key , c9000_float , c9000_smallfloat
, c9000_decimal , c9000_serial ) VALUES ( ? , ? , ? , ? , ? , ? , ? )
0 127 0 9 -F b321438 dbaudit waudit
INSERT INTO t9010database ( c9010_char , c9010_key , c9010_short ) VALUES ( ? , ? , ? )
1 134 0 15 -F aae0c38 dbaudit waudit
SELECT c9000_char , c9000_short , c9000_key , c9000_float , c9000_smallfloat ,
c9000_decimal , c9000_serial FROM t9000audit WHERE c9000_key = ?
1 143 0 3 -F b322c38 dbaudit waudit
INSERT INTO t9000audit ( c9000_char , c9000_key , c9000_short ) SELECT c9010_char , c9010_key
+ ? , c9010_short FROM t9010database
2 93 0 7 -F aae9838 dbaudit waudit
DELETE FROM t9000audit WHERE c9000_key = ?
2 276 0 7 -F aaefc38 dbaudit waudit
SELECT count ( * ) FROM t9000audit
2 240 1 7 -F b332838 dbaudit waudit
SELECT COUNT ( * ) FROM t9000audit WHERE c9000_char = ? AND c9000_key = ? AND
c9000_short = ?
3 31 0 7 -F aaec038 dbaudit admin
SELECT count ( * ) FROM t9000audit WHERE c9000_key = ?
3 45 0 1 -F b31e438 dbaudit admin
DELETE FROM t9000audit
3 116 0 0 -F b362038 dbaudit waudit
SELECT COUNT ( * ) FROM t9000audit
Total number of entries: 10.
| Field | Description |
|---|---|
| #lrus | Number of least recently used queues (LRUS) |
| currsize | Current cache size |
| maxsize | Limit on total cache memory |
| Poolsize> | Total pool size |
| #hits | The number of hits before insertion. This number equals the value of the STMT_CACHE_HITS configuration parameter |
| nolimit | The value of the STMT_CACHE_NOLIMIT configuration parameter |
The Statement Cache Entries section shows the entries that are fully inserted into the cache.
| Field | Description |
|---|---|
| lru | The index of lru queue to which the cache entry belongs |
| hash | Hash values of cached entry |
| ref_count | Number of threads referencing the statement |
| hits | Number of times a statement matches a statement in the cache. The match can be for a key-only or fully cached entry. |
| flag | Cache entry flag -F indicates the statement is fully cached -D indicates the statement is dropped |
| heap_ptr | Address of memory heap for cache entry |
To discuss how Oninit ® can assist please call on +1-913-674-0360 or alternatively just send an email specifying your requirements.