Oracle Database Cache Concepts and Administration Guide Release 1.0.2.1 Part Number A88706-01 |
|
Oracle Database Cache provides the following views, which let you use SQL to obtain information, such as statistics and objects cached, from the cache:
The view contains statistics about the queries executed by clients. It contains a single row that represents the aggregate statistics for the entire cache.
The following table shows the columns in the view:
The following example shows a SQL query that retrieves information from this view:
SQL> select * from dba_icache_aggregate_stats; HIT_COUNT MISS_COUNT OTHER_COUNT TOTAL_COUNT ---------- ---------- ----------- ----------- 3670945 196282 2075 3869302
This view contains information about the objects in the cache. It contains one row for each object in the cache.
The following table shows the columns in the view:
The following example shows a query that returns information about the cached table EMP:
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS'; Session altered. SQL> select object_name, sync_method, start_date, interval from dba_icache_ objects where object_name='EMP'; OBJECT_NAME -------------------------------------------------------------------------------- SYNC_METHOD -------------------------------------------------------------------------------- START_DATE -------------------------------------------------------------------------------- INTERVAL ---------- EMP COMPLETE 05-NOV-2000 01:01:00 86400
This view contains information, such as status, hit and miss count, and SQL text, about each query executed against the cache. It contains one row for each query.
The following table shows the columns in the view:
The following example shows the number of queries executed against the EMP table and the total number of times they were executed:
SQL> select count(*), sum(TOTAL_COUNT) from DBA_ICACHE_QUERY_STATS where upper(SQL_TEXT) like '%SCOTT.EMP%'; COUNT(*) SUM(TOTAL_COUNT) ---------- ---------- 23 1300
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|