Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Read Hit Ratio Question- Suggestions Welcome.
Tapan Trivedi <tapan.trivedi_at_abbnm.com> wrote in message
news:37A9AFF1.E7098856_at_abbnm.com...
> Hey Gurus,
> I am doing this query to find out the Read Hit ratios on a Baseline
> system (upon which further development will be done) .
>
> select 1-(sum(decode(name, 'physical reads', value,0))/
> (sum(decode(name, 'db block gets', value,0)) +
> (sum(decode(name, 'consistent gets', value,0))))) * 100
> "Read Hit Ratio"
> from v$sysstat;
>
> I am getting very weird results on about four systems on which I have
> run the queries . I am getting NEGATIVE, yes, NEGATIVE results. What
> does this mean ?
Since you put the parentheses in the wrong place. Simply put another ones:
select (1-(sum(decode(name, 'physical reads', value,0))/
(sum(decode(name, 'db block gets', value,0)) +
(sum(decode(name, 'consistent gets', value,0))))) )* 100
"Read Hit Ratio"
from v$sysstat;
Received on Fri Aug 06 1999 - 00:34:02 CDT
![]() |
![]() |