PARENT LATCH and CHILD LATCH
在ORACLE 的内部,内部数据结构大部分都是由一个latch所保护,但是有的也是由多个latch进行保护。例如:一组library cache latches保护library cache中的对象组,而多个buffers chains latches 用来保护buffer cache hash chains 。
只要一组latch 被用来保护一个struction 的不同部分,或者不同的等价struction ,这些latch 都称作child latch;每一组相同类型的child latch 都存在一个parent latch 。 parent latch 与child latch 都可以被获得,但在实际中,你有可能看到被获得的parent latch 只有一个:library cache ,但相对于child latch 也是非常稀少的事件。
有的时候oracle 会指定没有children 的独閂锁作为parent latch,因此在v$latch_parent 中会包含有一行的solitary latches信息,就像其他真正的parent latch一样。而v$LATCH_CHILDREN 每一行都包含child latch 信息。因此,v$latch_children,v$latch_parent 描述了全部的latch 信息。V$latch 包含了全部latch 进行group by latch type后的概要信息,如果出现了令人怀疑的latch 问题的时候,v$latch 是进行分析的第一个视图。如果latch 关联一组相同类型的latch 的时候,进行分析 v$latch_children 。
V$LATCH_CHILREN 是由视图GV$LATCH_CHILDREN 产生.
GV$LATCH_CHILDREN的试图:
select t.inst_id,
t.addr,
t.kslltnum,
t.kslltcnm,
n.kslldlvl,
n.kslldnam,
t.kslltwgt,
t.kslltwff,
t.kslltwsl,
t.kslltngt,
t.kslltnfa,
t.kslltwkc,
t.kslltwth,
t.ksllthst0,
t.ksllthst1,
t.ksllthst2,
t.ksllthst3,
t.ksllthst4,
t.ksllthst5,
t.ksllthst6,
t.ksllthst7,
t.ksllthst8,
t.ksllthst9,
t.ksllthst10,
t.ksllthst11,
t.kslltwtt
from x$ksllt t, x$kslld n
where t.kslltcnm > 0
and t.kslltnum = n.indx;
V$LATCH_PARENT:
select t.inst_id,
t.addr,
t.kslltnum,
t.kslltcnm,
n.kslldlvl,
n.kslldnam,
t.kslltwgt,
t.kslltwff,
t.kslltwsl,
t.kslltngt,
t.kslltnfa,
t.kslltwkc,
t.kslltwth,
t.ksllthst0,
t.ksllthst1,
t.ksllthst2,
t.ksllthst3,
t.ksllthst4,
t.ksllthst5,
t.ksllthst6,
t.ksllthst7,
t.ksllthst8,
t.ksllthst9,
t.ksllthst10,
t.ksllthst11,
t.kslltwtt
from x$ksllt t, x$kslld n
where t.kslltcnm = 0
and t.kslltnum = n.indx;
Trackback URL: http://blog.itpub.net//trackback.php?id=55475
| « | 十一月 2008 | » | ||||
|---|---|---|---|---|---|---|
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |