Thursday, July 9, 2009

Query to find out hit ratio of Oracle

To find out Library cache hit ratio

select sum(PINS-RELOADS)/sum(PINS)*100 "Library hit ratio"
from v$librarycache

Details Library Cache Hit Ratio
Query more details about the hit ratio from each library cache item.
SQL> SELECT namespace, gethitratio
FROM v$librarycache
WHERE gethitratio > 0


To find out Dictionary cache hit ratio

select sum(GETS-GETMISSES)/sum(GETS)*100 "dictionary cahe ration"
from v$rowcache;

To find out Buffer cache hit ratio

select (1-(PHYSICAL_READS/(DB_BLOCK_GETS+CONSISTENT_GETS)))*100 "Buffer cache hit ratio"
from v$buffer_pool_statistics;

No comments:

Post a Comment

Command to do active duplicate for Oracle Database

1. First login to target server 2. Validate tns connectivity between Source DB and Target DB 3. Prepare and validate space availability 4. S...