OraQA

Oracle Question and Answer

  • Do you have a solution to a problem? Do you have an unanswered question? Login and share it with the Oracle community. More...

Oracle News


Entries RSS feed

Comments RSS feed

How to calculate buffer cache hit ratio

February 16th, 2006 By Vadim Bobrov

There is no universal formula. The one most commonly used:

1 – ( physical reads / ( consistent gets + db block gets ) )

A better formula is:

1 – ( ( physical reads – (physical reads direct + physical reads direct (lob)) ) /
( db block gets + consistent gets – (physical reads direct + physical reads direct (lob)) )

In Oracle8.0 onwards it is possible to use multiple buffer pools. The hit ratios for each pool can be calculated using:

SELECT
    name,
    1-(physical_reads / (consistent_gets + db_block_gets ) )  "HIT_RATIO"
FROM V$BUFFER_POOL_STATISTICS
WHERE ( consistent_gets + db_block_gets ) !=0

except for 8.1.7 where due to a bug one must resort to the previous formula.

Vadim Bobrov
Oracle Database Tools
http://www.fourthelephant.com

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this question