oraunix 发表于 2010-11-14 17:19:10

没事看看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);

xiucai 发表于 2013-11-4 14:50:50

相老师,这个语句查出来的ConsistentRead是什么意思

Capricorn 发表于 2013-11-5 16:51:09

好深奥,看不懂

cxmfyl 发表于 2013-11-6 08:23:46

支持相老师!顶!
页: [1]
查看完整版本: 没事看看buffer cache的状态