命中率指标虽然非绝对,但也是个重要的参考依据
1.数据缓冲区的使用命中率:
SQL> select name, value from v$sysstat where name in ('db block gets', 'consistent gets', 'physical reads');
NAME VALUE
---------------------------------------------------------------- ----------
db block gets 574110
consistent gets 1191845
physical reads 18215
来查看数据库数据缓冲区的使用情况。
查询出来的结果可以计算出来数据缓冲区的使用命中率=
1 - (physical reads / (db block gets + consistent gets))。
这个命中率应该在90%以上,否则需要增加数据缓冲区的大小。
2.buffer cache命中率
select 1-((physical.value - direct.value - lobs.value)/logical.value) "Buffer Cache Hit Ratio"
from V$SYSSTAT physical, V$SYSSTAT direct, V$SYSSTAT lobs, V$SYSSTAT logical
where physical.name = 'physical reads'
And direct.name = 'physical reads direct' AND lobs.name = 'physical reads direct (lob)'
And logical.name = 'session logical reads';
SQL>
Buffer Cache Hit Ratio
----------------------
0.989616782275326
阅读(1279) | 评论(0) | 转发(0) |