前几天看一些书,学习latch的性能优化,
我发现V$lcatch的视图,10g的与8i的不同,
增加了一个wait_time字段,
我以这个字段desc排序,发现主要的latch问题还是按照这个字段排序的。
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1136.htm
WAIT_TIME NUMBER Elapsed time spent waiting for the latch (in microseconds)
看来可以根据这个来优化latch的问题。8i下可以使用以下sql语句评估:
select
l.name,
l.sleeps * l.sleeps / (l.misses - l.spin_gets) impact,
lpad(to_char(100 * l.sleeps / l.gets, '990.00') || '%', 10) sleep_rate,
l.waits_holding_latch,
l.level#
from
sys.v_$latch l
where
l.sleeps > 0
order by
2 desc
我发现V$lcatch的视图,10g的与8i的不同,
增加了一个wait_time字段,
我以这个字段desc排序,发现主要的latch问题还是按照这个字段排序的。
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1136.htm
WAIT_TIME NUMBER Elapsed time spent waiting for the latch (in microseconds)
看来可以根据这个来优化latch的问题。8i下可以使用以下sql语句评估:
select
l.name,
l.sleeps * l.sleeps / (l.misses - l.spin_gets) impact,
lpad(to_char(100 * l.sleeps / l.gets, '990.00') || '%', 10) sleep_rate,
l.waits_holding_latch,
l.level#
from
sys.v_$latch l
where
l.sleeps > 0
order by
2 desc