title: Oracle : Buffer Hit Ratio Vs Buffer Cache Hit Ratio
body: <p>can anyone differentiate Buffer Hit Ratio and Buffer Cache Hit Ratio in Oracle database?</p>
  <p>Buffer Hit Ratio:</p>
  <p><code>select CASE WHEN (sum (decode (name,'db block gets', value, 0)) + (sum (decode (name,'consistent gets', value, 0)))) = 0 THEN 0 ELSE trunc ((1- (sum (decode (name,'physical reads', value, 0)) / (sum (decode (name,'db block gets', value, 0)) + (sum (decode(name,'consistent gets', value, 0)))))) * 100) END from v$sysstat</code></p>
  <p>Buffer Cache Hit Ratio:</p>
  <p><code>select CASE WHEN (sum (decode (name,'db block gets from cache', value, 0)) + (sum (decode (name,'consistent gets from cache', value, 0)))) = 0 THEN 0 ELSE trunc ((1- (sum (decode (name,'physical reads from cache', value, 0)) / (sum (decode (name,'db block gets from cache', value, 0)) + (sum (decode(name,'consistent gets from cache', value, 0)))))) * 100) END from v$sysstat</code></p>