SQ LOCK
CACHE 속성의 개별 Sequence 를 보호하는 LOCK
시퀀스 관리 하기 위한 3가지 락
1. Row Cache Lock - Nocache Sequence
2. SQ Lock - Cache Sequence
3. SV Lock - Cache + Order Sequence ( RAC )
( TEST )
SQL> create sequence s1 cache 10 ;
Sequence created.
세션1) SQL> @temp.sql
세션2) SQL> @temp.sql
SQL> SELECT A.SID, A.SEQ#, B.EVENT, B.P1, B.P2, C.OBJECT_NAME
from v$session_wait B, V$SESSION A, DBA_OBJECTS C
WHERE A.EVENT like 'enq: SQ - contention%'
AND A.SID = B.SID
AND A.SEQ# = B.SEQ#
AND A.P2 = C.OBJECT_ID ;
SQ LOCK 경합
: Cache 크기가 작은 Sequence