Databases Reference
In-Depth Information
■
to learn more about the physical characteristics and configuration of the pCi flash storage on the exadata
storage cells, please refer to recipes 1-6 and 3-3.
Note
18-2. Determining Which Database Objects Are Cached
Problem
You wish to determine which database objects are currently cached in Smart Flash Cache.
Solution
In this recipe, you will learn how to use the
list flashcachecontent
CellCLI command to report the objects
currently stored in Smart Flash Cache and map these to database object names.
Using
dcli
or
cellcli
from a storage cell, run the following command:
[oracle@cm01dbm01 ~]$ dcli -g ./cell_group cellcli -e list flashcachecontent \
> attributes dbUniqueName,hitCount,missCount,cachedSize,objectNumber
cm01cel01: EDW 0 2 98304 3
cm01cel01: DWPRD 0 0 57344 8
cm01cel01: VISY 0 0 8192 8
cm01cel01: EDW 9 15 729088 18
cm01cel01: DWPRD 0 0 16384 18
... Output omitted for brevity
Here, we are listing the database name that the object belongs to, the SFC hit count, SFC miss count, the cached
size (in bytes), and the
objectNumber
. This
objectNumber
corresponds to the
DATA_OBJECT_ID
from the
%_TABLES
data dictionary views in your database. Using the fourth row from this output, we can see that
objectNumber
18 from
a database called
EDW
has experienced 9 SFC hits and 15 SFC misses, and has had a total of 729088 bytes. To map this
to the actual object name, query
DBA_OBJECTS
while logged in to the appropriate database. In the following script, we
can see that
objectNumber
18 is the
SYS.OBJ$
table:
SQL> select data_object_id dobject_id,object_name,owner
2 from dba_objects
3 where data_object_id=18;
DataObjId Object Owner
--------- ------------------------- --------------
18 OBJ$ SYS
If you have a specific object that you wish to determine the cache status for, you can add where conditions to your
list flashcachecontent
command:
SQL> select data_object_id
2 from dba_objects where owner='PO' and object_name='RCV_TRANSACTIONS';
DataObjId
--------------
3010199
Search WWH ::
Custom Search