Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Buffer Hit Ratio
This works fine. Thanks.
Another gentleman sent me this SQL :
select 100 * ( 1 - ( sum(DECODE(NAME,'physical reads',value)) / (
sum(DECODE(NAME,'db block gets',value)) + sum(DECODE(NAME,'consistent
gets',value)) )) ) a
from v$sysstat
where name in ('physical reads','db block gets','consistent gets')
Results of both are listed here :
SQL> select (1 - (phy.value /( cur.value + con.value ))) * 100 hit_ratio
2 from v$sysstat cur, v$sysstat con, v$sysstat phy
3 where cur.name = 'db block gets' and
4 con.name = 'consistent gets' and
5 phy.name = 'physical reads'
6 /
HIT_RATIO
SQL> select (1-(sum(decode(name, 'physical reads', value,0))/
2 (sum(decode(name, 'db block gets', value,0)) + 3 (sum(decode(name, 'consistent gets', value,0)))))) * 100 4 "Buffer Hit Ratio"
Buffer Hit Ratio
85.879768
Sebastian Rehm <sebastian.rehm_at_de.bosch.com> wrote in article
<375E2362.6283177C_at_de.bosch.com>...
> I don't know whats going wrong with the code ...
> use the following to calculate the buffer hit ratio:
>
> select (1 - (phy.value /( cur.value + con.value ))) * 100 hit_ratio
> from v$sysstat cur, v$sysstat con, v$sysstat phy
> where cur.name = 'db block gets' and
> con.name = 'consistent gets' and
> phy.name = 'physical reads'
> /
>
> Sebastian
>
> Verma wrote:
>
> > Any clue what is going wrong ?
>
>
>
>
Received on Fri Jun 11 1999 - 13:17:04 CDT