Sidebar

Script para determinar el "cache hit ratio" de nuestra instancia en Oracle:

PROMPT
PROMPT El Hit ratio debe ser mayor que 90%
col SYS_DATE format a25
SELECT to_char(sysdate,'DD-MM-YY HH:Mi:SS') as SYS_DATE, Sum(Decode(a.name, 'consistent gets',
       a.value, 0)) "Consistent Gets",
       Sum(Decode(a.name, 'db block gets', a.value, 0)) "DB Block Gets",
       Sum(Decode(a.name, 'physical reads', a.value, 0)) "Physical Reads",
       Round(((Sum(Decode(a.name, 'consistent gets', a.value, 0)) +
         Sum(Decode(a.name, 'db block gets', a.value, 0)) -
         Sum(Decode(a.name, 'physical reads', a.value, 0))  )/
           (Sum(Decode(a.name, 'consistent gets', a.value, 0)) +
             Sum(Decode(a.name, 'db block gets', a.value, 0))))
             *100,2) "Hit Ratio %"
FROM   v$sysstat a;

 

Carlos Contreras
Oracle Certified DBA


Tips BD