Doc
Name: HIT_INS.sql
Author: Mahnho Han
Hit Ratio of Instance
100%에 가까울수록 바람직
#
TTITLE 'The Hit Ratio'
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;
|