ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 命中率查詢

命中率查詢

原创 Linux操作系统 作者:golden_zhou 时间:2011-09-16 17:08:17 0 删除 编辑

查询数据字典缓存命中率
select (1-(sum(getmisses)/sum(gets))) * 100 "Hit Ratio"
from v$rowcache;

查询库缓存命中率
select Sum(Pins) / (Sum(Pins) + Sum(Reloads)) * 100 "Hit Ratio"
from V$LibraryCache;


获得内存和磁盘排序的查询
select a.value "Disk Sorts", b.value "Memory Sorts",
round((100*b.value)/decode((a.value+b.value),0,1,(a.value+b.value)),2)
"Pct Memory Sorts"
from v$sysstat a, v$sysstat b
where a.name = 'sorts (disk)'
and b.name = 'sorts (memory)';

查询空闲的数据缓冲区

select decode(state,0, 'FREE',
1,decode(lrba_seq,0,'AVAILABLE','BEING USED'),
3, 'BEING USED', state) "BLOCK STATUS",
count(*)
from x$bh
group by decode(state,0,'FREE',1,decode(lrba_seq,0,'AVAILABLE',
'BEING USED'),3, 'BEING USED', state);

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25198367/viewspace-707739/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 自动撤消管理
请登录后发表评论 登录
全部评论

注册时间:2011-03-09

  • 博文量
    238
  • 访问量
    344444