Thursday, December 13, 2007

Monitoring Redo Latches

The following query caclulates 2 ratios for redo copy latch & redo allocation latch.

If either of the 2 ratios is above 1% then we have latch contention.

SELECT substr(ln.name, 1, 20) "Latch"
, round(misses/gets,2) "misses/gets ratio",
case when immediate_gets=0 then 0 else
round(immediate_misses/immediate_gets,2)
end "immediate misses/gets ratio"
FROM v$latch l, v$latchname ln
WHERE ln.name in ('redo allocation', 'redo copy')
and ln.latch# = l.latch#;

No comments:

Post a Comment