查询数据字典缓存命中率
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博客 ” ,链接:http://blog.itpub.net/25198367/viewspace-707739/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25198367/viewspace-707739/