Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Computing the Hit Ratio

  • Source: http://www.oreilly.com/catalog/oracle2/chapter/ch10.html
  • SELECT 
       SUM(DECODE(name, 'consistent gets',value, 0))  "Consis Gets",
       SUM(DECODE(name, 'db block gets',value, 0))    "DB Blk Gets",
       SUM(DECODE(name, 'physical reads',value, 0))   "Phys Reads",
      (SUM(DECODE(name, 'consistent gets',value, 0))  
        + SUM(DECODE(name, 'db block gets',value, 0))  
        -  SUM(DECODE(name, 'physical reads',value, 0)))
        / (SUM(DECODE(name, 'consistent gets',value, 0)) 
        + SUM(DECODE(name, 'db block gets',value, 0))  )  * 100 "Hit Ratio" 
    FROM v$sysstat;
    
  • No labels