Saturday, April 02, 2011

How to display content attributes on Exadata Storage?

On Exadata, After We created flashcache on exadata storage. How to know it work!!! Because on database, we don't change anything.
On Database: we can check...
SQL> select name,value from v$sysstat where name in ('physical read total IO requests','cell flash cache read hits');

NAME VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 17467680
cell flash cache read hits 108435
By the way, On Exadata Storage: We can use "LIST FLASHCACHECONTENT" command to display content attributes on Exadata Storage.
CellCLI> help list flashcachecontent

Usage: LIST FLASHCACHECONTENT [<filters>] [<attribute_list>] [DETAIL]

Purpose: Displays specified attributes for flash cache entries.

Arguments:
<filters>: An expression which determines the entries to be displayed.
<attribute_list>: The attributes that are to be displayed.
ATTRIBUTES {ALL | attr1 [, attr2]... }

Options:
[DETAIL]: Formats the display as an attribute on each line, with
an attribute descriptor preceding each value.

Examples:
LIST FLASHCACHECONTENT DETAIL
So, I would like to test some... about " LIST FLASHCACHECONTENT" command
CellCLI> list flashcachecontent detail
cachedKeepSize: 0
cachedSize: 131072
dbID: 2080757153
dbUniqueName: DB
hitCount: 0
missCount: 2
objectNumber: 8
tableSpaceNumber: 0

cachedKeepSize: 0
cachedSize: 65536
dbID: 2080757153
dbUniqueName: DB
hitCount: 0
missCount: 3
objectNumber: 29
tableSpaceNumber: 0

cachedKeepSize: 0
cachedSize: 229376
dbID: 2080757153
dbUniqueName: DB
hitCount: 6
missCount: 4
objectNumber: 36
tableSpaceNumber: 0
However, We can display specific object:
On Database:
SQL> alter table SALES storage (cell_flash_cache keep);

Table altered.

SQL> select * from sales;

SQL> select object_id from user_objects where object_name='SALES';

OBJECT_ID
----------
25076
On Storage: Check from objectNumber=25076
CellCLI> list flashcachecontent where objectnumber=25076 detail
cachedKeepSize: 153632768
cachedSize: 153632768
dbID: 2080757153
dbUniqueName: DB
hitCount: 9
hoursToExpiration: 24
missCount: 154
objectNumber: 25076
tableSpaceNumber: 673
What did we see? database name/tablespace number/object number/cached size/...
SQL> select name from v$database;

NAME
---------
DB

SQL> select name from ts$ where ts#=673;

NAME
------------------------------
EXA_TEST

No comments: