select l.latch# latch,l.name, nvl(c.latches, 0) children, l.gets, l.misses, l.gets-l.misses "Simple Gets",
round((l.gets-l.misses) / l.gets,4)*100 "Simple Gets Ratio(%)",
l.spin_gets, round(l.spin_gets / l.gets,4)*100 "Spin Gets Ratio(%)",
l.sleeps "Sleep Get", round(l.sleeps / l.gets,4)*100 "Sleep Gets Ratio(%)",
l.immediate_gets,
l.immediate_misses,
to_char(sysdate, 'yyyy/mm/dd hh24:mi:ss') currTime
from v$latch l,
(SELECT latch#, count(*) latches
FROM v$latch_children c
GROUP BY latch#) c
where l.latch# = c.latch#(+)
AND l.gets > 0
ORDER BY latch;
round((l.gets-l.misses) / l.gets,4)*100 "Simple Gets Ratio(%)",
l.spin_gets, round(l.spin_gets / l.gets,4)*100 "Spin Gets Ratio(%)",
l.sleeps "Sleep Get", round(l.sleeps / l.gets,4)*100 "Sleep Gets Ratio(%)",
l.immediate_gets,
l.immediate_misses,
to_char(sysdate, 'yyyy/mm/dd hh24:mi:ss') currTime
from v$latch l,
(SELECT latch#, count(*) latches
FROM v$latch_children c
GROUP BY latch#) c
where l.latch# = c.latch#(+)
AND l.gets > 0
ORDER BY latch;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24237320/viewspace-2143142/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24237320/viewspace-2143142/