没事看看buffer cache的状态
本帖最后由 oraunix 于 2010-11-14 17:20 编辑研究一下x$bh,更加深入的了解一下buffer cache。
select /*+ ordered */
tot_bc_mem.TotBCMem,
decode(state,
0,'Free',
1,'Exclusive',
2,'SharedCurrent',
3,'ConsistentRead',
4,'BeingRead',
5,'InMediaRecoveryMode',
6,'InInstanceRecoveryMode',
7,'BeingWriten',
8,'Pinned',
9,'Memory',
10,'Mrite',
11,'Donated'
) "BlockDtate",
sum(blsiz) "SumStateTypeMem",
count(1) "NumOfBlksThisTyp",
round(sum(blsiz)/tot_bc_mem.TotBCMem,2)*100||'%' "PctTotBCMem"
from (select sum(blsiz) TotBCMem
from x$bh) tot_bc_mem,
x$bh
group by tot_bc_mem.TotBCMem,
decode(state,
0,'Free',
1,'Exclusive',
2,'SharedCurrent',
3,'ConsistentRead',
4,'BeingRead',
5,'InMediaRecoveryMode',
6,'InInstanceRecoveryMode',
7,'BeingWriten',
8,'Pinned',
9,'Memory',
10,'Mrite',
11,'Donated'
)
order by sum(blsiz);
相老师,这个语句查出来的ConsistentRead是什么意思 好深奥,看不懂 支持相老师!顶!
页:
[1]