Database Tuning (MOSC)

MOSC Banner

Why value of consistent gets is different in v$sysstat and v$buffer_pool_statistics

edited Oct 22, 2009 8:38AM in Database Tuning (MOSC) 1 commentAnswered
 Hi:

I am trying to calculate the buffer hit ratio. We only have one default buffer pool. I got different results from two different calculations.

SQL> Select 1 - phy.value/(con.value + dbb.value)
From v$sysstat dbb, v$sysstat con, v$sysstat phy
where dbb.name ='db block gets from cache'
and con.name = 'consistent gets from cache'
and phy.name = 'physical reads cache';
  2    3    4    5

1-PHY.VALUE/(CON.VALUE+DBB.VALUE)
---------------------------------
                       .905156615

SQL> select name, physical_reads, db_block_gets,consistent_gets,
1-(physical_reads/(db_block_gets + consistent_gets)) "Hit Ratio" from v$buffer_pool_statistics;  2


NAME                 PHYSICAL_READS DB_BLOCK_GETS CONSISTENT_GETS  Hit Ratio

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center