latch:row cache objects
当涉及到数据字典(dc)的操作时,就需要首先获得这个latch。例如生成执行计划时候,可能涉及直方图,那么就会涉及到相关dc信息。
该latch的相关参数:
P1 = Latch address
P2 = Latch number
P3 = Tries
根据p1raw可以定位到是在等待什么类型的dc:
SELECT
kqrsttxt PARAMETER,
-- kqrstcid CACHE#,
kqrstcln "Lchild#",
kqrstgrq "DCGets",
l.gets "LGets",
l.misses "Misses"
FROM X$KQRST, V$LATCH_CHILDREN l
WHERE l.addr='&P1RAW'
and l.child#=KQRSTCLN
ORDER BY 1,2
SQL> SELECT distinct
a.kqrsttxt "PARAMETER",
a.kqrstcln "Lchild#",
a.kqrstgrq "DCGets",
b.gets "LGets",
b.misses "Misses"
FROM X$KQRST a ,
V$LATCH_CHILDREN b
WHERE a.kqrsttxt like 'dc%'
and b.child#=a.KQRSTCLN
ORDER BY 1,2
2 3 4 5 6 7 8 9 10 11 12 ;
PARAMETER Lchild# DCGets LGets Misses
-------------------------------- ---------- ---------- ---------- ----------
dc_awr_control 47 32 0 0
dc_awr_control 47 32 5 0
dc_awr_control 47 32 12 0
dc_awr_control 47 32 45 0
dc_awr_control 47 32 97 0
dc_awr_control 47 32 396 0
dc_awr_control 47 32 1015 0
dc_constraints 11 0 0 0