Cheeky Cockatoo

Life Advice and Stories, Travel, Oracle Tech, Good Food and More

cache_hits.sql

Download Script

col name format a15
select a.name, a.value, b.name, b.value, c.name, c.value,
       1 - ( c.value / ( a.value + b.value ) ) cache_hit
from v$sysstat a, v$sysstat b, v$sysstat c
where a.name = 'db block gets'
and   b.name = 'consistent gets'
and   c.name = 'physical reads';