Custom Search . . .

Thursday, April 12, 2007

Get Buffer Hit Ratio

Make select from v$sysstat.

When you make select from v$sysstat you get the following statistics:

Consistent gets - number of the data blocks which were accessed in the buffer cache for SQL statements, that do not modify data - just SELECT statements


DB block gets - number of the data blocks which were accessed in the buffer cache for SQL statements that modify data - INSERT, UPDATE, DELETE and SELECT FOR UPDATE statements;

Physical reads - number of the data blocks that where read from the disk.

The sum of consistent gets and db block gets is the number of the logical reads.

The buffer hit ratio is:

(logical reads - physical reads) / logical reads

or

(consistent gets + db block gets - physical reads) / (consistent gets + db block gets)

Thanks & Regards

Babu B