1. 程式人生 > >等待事件:enq: SQ

等待事件:enq: SQ

Top 10 Foreground Events by Total Wait Time

Event Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class
enq: SQ - contention 259 87.7K 338548 23.3 Configuration
buffer busy waits 6,413 69.9K 10900 18.6 Concurrency
enq: HW - contention 1,780 63.5K 35669 16.9 Configuration
DB CPU 11.7K 3.1
gc buffer busy acquire 15,486 6112.9 395 1.6 Cluster
SQL*Net message from dblink 12,255,704 4795.8 0 1.3 Network
db file scattered read 771,893 2263.7 3 .6 User I/O
gc current request 3 1720.8 573601 .5 Cluster
SQL*Net break/reset to client 5,089,961 1307.7 0 .3 Application
db file sequential read 677,223 928.9 1 .2 User I/O

enq: SQ - contention

在記憶體上快取(cache)範圍內,呼叫sequence.nextval期間擁有此鎖,賦予了cache+noorder 屬性的sequence上發生。

select to_char(SAMPLE_TIME,'YYYY-MM-DD HH24:MI'),event,count(1) 
from dba_hist_active_sess_history where snap_id between xxx and xx
and instance_number=1  and event='latch free'
group by to_char(SAMPLE_TIME,'YYYY-MM-DD HH24:MI'),event 
order by 1;


select to_char(SAMPLE_TIME,'YYYY-MM-DD HH24:MI') st ,sql_id,event,program,p1,p2,p3 
from dba_hist_active_sess_history 
where snap_id between xxx and xxxx and instance_number=1 and program like '%LCK%';

http://blog.csdn.net/lqx0405/article/details/46332283