SlideShare a Scribd company logo
1 of 56
Download to read offline
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ver.2
(2016.07.18)
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅰ. Transaction slot Before-image Chaining
Ⅰ-1. Questions
Ⅰ-2. Architecture of transaction slot before-image chaining
Ⅰ-3. Flow chart of delayed block cleanout
Ⅱ. Block cleanout Analysis
Ⅱ-1. Fast block cleanout (Fast commit)
Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot
Ⅱ-3. Efficient Delayed Block Cleanout
(Delayed block cleanout using “commit SCN” of TRN CTL)
Ⅱ-4. Inefficient Delayed Block Cleanout
(Delayed block cleanout using ”commit SCN” of transaction slot before-image chaining)
Table of Agenda
Oracle Deep Internal
Ⅰ. Transaction slot Before-image Chaining
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Select 시 db file sequential read가 반복적으로 수행되는 wait 현상이 대형 오라클 사이트에서 빈번하게 발생
File: Undo file
Block: Undo block
Ⅰ-1. Questions
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Transaction slot의 commit scn을 data block itl의 scn/fsc 컬럼에 update 하는 것
Cleanout 이란 무엇인가?
Question 1
Answer 1
Data blockData block
BH (0x643fa1c8) file#: 5 rdba: 0x0140dcad (5/56493) class: 1 ba: 0x643b6000
st: XCURRENT md: EXCL fpin: 'kdswh11: kdst_fetch' tch: 1
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x000a.000.00000534 0x018000d2.01e6.01 C--- 0 scn 0x0000.003dbe3a
0x02 0x0007.000.000004ed 0x018000a2.01d5.01 ---- 1 fsc 0x0000.00000000
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
BH (0x643fa1c8) file#: 5 rdba: 0x0140dcad (5/56493) class: 1 ba: 0x643b6000
st: XCURRENT md: EXCL fpin: 'kdswh11: kdst_fetch' tch: 1
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x000a.000.00000534 0x018000d2.01e6.01 C--- 0 scn 0x0000.003dbe3a
0x02 0x0007.000.000004ed 0x018000a2.01d5.01 --U- 1 fsc 0x0000.003dbe4e
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Header
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------
0x00 10 0x80 0x04ed 0x0000 0x0000.003dbe4e 0x018000a2
0x01 9 0x00 0x04ec 0x0002 0x0000.003d6d72 0x00000000
0x02 9 0x00 0x04ec 0x0003 0x0000.003d6d72 0x00000000
Transaction 상태 Cleanout 상태
Commit scn
Commit scn
적용 전
Commit scn
적용 후
Transaction
상태
Ⅰ-1. Questions
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
순식간에 완료된다.
• 일부만 먼저 cleanout 하고 나머지는 나중에 cleanout하기 때문에 시간이 적게 소요된다.
만약 100억 건을 update 한 후에 Commit을 한다면,
100억 건에 대해서 모두 완료하기까지 시간이 얼마나 소요될까?
Question 2
Answer 2
Ⅰ-1. Questions
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo는 제한된 자원이기 때문에 트랜잭션 슬롯은 overwrite 된다.
나중에 사용하기 위해서 저장하고 있던 commit SCN은 어떻게 될까?
Question 3
• Undo는 제한적인 자원이기 때문에 영원히 보관할 수 없고, 시간이 지나면 aging out 된다.
• Undo slot의 before image가 chaining 되면서 저장된다.
• (뒤의 슬라이드 참조)
Answer 3
Ⅰ-1. Questions
Undo Header
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------
0x00 10 0x80 0x04ed 0x0000 0x0000.003dbe4e 0x018000a2
0x01 9 0x00 0x04ec 0x0002 0x0000.003d6d72 0x00000000
0x02 9 0x00 0x04ec 0x0003 0x0000.003d6d72 0x00000000
Commit scn
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
UNDO BLK
rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7
uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811
rdba: 0x0180011e (6/286)
TRN CTL
seq: 0x0485 chd: 0x0006 ctl: 0x0005
uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff
index state cflags wrap# uel scn dba
-------------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c
rdba: 0x01800160 (6/352)
• Chd: chain header로 링크드 리스트의 시작, 다음 번
트랜잭션이 사용할 트랜잭션 테이블 슬롯
• Ctl: chain tail로 링크드 리스트의 끝, 해당 언두 세그
먼트에서 마지막으로 사용한 트랜잭션 테이블 슬롯
TRN CTL
seq: 0x0485 chd: 0x0005 ctl: 0x0006
uba: 0x0180011e.0485.02 scn: 0x0000.0022c811
index state cflags wrap# uel scn dba
---------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 10 0x80 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
rdba: 0x01800160 (6/352)
Update된 undo header block은
TRN CTL uba에 before-image의 위
치를 기록하고, SCN에 이전 슬롯의
SCN을 기록
2
file#=6
block#=352
Ⅰ-2. Architecture of transaction slot before-image chaining (1/3)
chd 0x0006 슬롯을 사용할 예정이기
때문에 uba, trn ctl SCN, 0x06 slot
SCN이 before-image로 저장
1
Before-image
Update
2
0x06 슬롯 갱신
(state 10, cflags 0x80, SCN 갱신)
3
1 11
2
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅰ-2. Architecture of transaction slot before-image chaining (2/3)
TRN CTL
seq: 0x0485 chd: 0x0006 ctl: 0x0005
uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff
index state cflags wrap# uel scn dba
-------------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c
rdba: 0x01800160 (6/352)
TRN CTL
seq: 0x0485 chd: 0x0005 ctl: 0x0006
uba: 0x0180011e.0485.02 scn: 0x0000.0022c811
index state cflags wrap# uel scn dba
-------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
rdba: 0x01800160 (6/352)
UNDO BLK
rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7
uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811
rdba: 0x0180011e (6/286)
Before-image
UNDO BLK
rdba: 0x0180011f seq: 0x485 Rec # 0x2 slt: 0x05 xid: 0x0001.006.00000ad7
uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022c811 prv tx scn: 0x0000.0022c818
rdba: 0x0180011f (6/287)
chd 0x0005 슬롯을 사용할 예정이기
때문에 uba, trn ctl SCN, 0x05 slot
SCN이 before-image로 저장
1
1 1
TRN CTL
seq: 0x0485 chd: 0x0006 ctl: 0x0005
uba: 0x0180011f.0485.02 scn: 0x0000.0022c818
index state cflags wrap# uel scn dba
---------------------------------------------------------------------------
0x05 10 0x80 0x0ad5 0xffff 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f
rdba: 0x01800160 (6/352)
Update
Update된 undo header block은 TRN
CTL uba에 before-image의 위치를
기록하고, SCN에 이전 슬롯의 SCN을
기록
2
2
2
1
0x05 슬롯 갱신
(state 10, cflags 0x80, SCN 갱신)
3
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅰ-2. Architecture of transaction slot before-image chaining (3/3)
TRN CTL
seq: 0x0485 chd: 0x0006 ctl: 0x0005
uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff
index state cflags wrap# uel scn dba
-------------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c
rdba: 0x01800160 (6/352)
TRN CTL
seq: 0x0485 chd: 0x0005 ctl: 0x0006
uba: 0x0180011e.0485.02 scn: 0x0000.0022c811
index state cflags wrap# uel scn dba
-------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
rdba: 0x01800160 (6/352)
UNDO BLK
rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7
uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811
rdba: 0x0180011e (6/286)
Before-image
UNDO BLK
rdba: 0x0180011f seq: 0x485 Rec # 0x2 slt: 0x05 xid: 0x0001.006.00000ad7
uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022c811 prv tx scn: 0x0000.0022c818
rdba: 0x0180011f (6/287)
TRN CTL
seq: 0x0485 chd: 0x0006 ctl: 0x0005
uba: 0x0180011f.0485.02 scn: 0x0000.0022c818
index state cflags wrap# uel scn dba
---------------------------------------------------------------------------
0x05 9 0x00 0x0ad5 0xffff 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f
rdba: 0x01800160 (6/352)
UNDO BLK
rdba: 0x01800120 seq: 0x486 Rec # 0x2 slt: 0x06 xid: 0x0001.005.00000ad5
uba: 0x0180011f.0485.02 ctl max scn: 0x0000.0022c818 prv tx scn: 0x0000.0022c821
rdba: 0x01800120 (6/288)
chd 0x0006 슬롯을 사용할 예정이기
때문에 uba, trn ctl SCN, 0x06 slot
SCN이 before-image로 저장
1
1
1
1
TRN CTL
seq: 0x0486 chd: 0x0005 ctl: 0x0006
uba: 0x01800120.0486.02 scn: 0x0000.0022c821
index state cflags wrap# uel scn dba
--------------------------------------------------------------------------
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 10 0x80 0x0ad8 0xffff 0x0000.0022c832 0x01800121
rdba: 0x01800160 (6/352)
Update
Update된 undo header block은 TRN
CTL uba에 before-image의 위치를 기록
하고, SCN에 이전 슬롯의 SCN을 기록
2
0x06 슬롯 갱신
(state 10, cflags 0x80, SCN 갱신)
3
2
2
Endless loop..
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
YES
NO
NO
YES
YES
NO
Wrap 번호가 같은가?
TRN CTL SCN 적용
Before-image SCN과 비교
반복 수행
해당 SCN 적용
해당 SCN 적용
<Delayed Block cleanout 작업>
Efficient delayed block cleanout
Inefficient delayed block cleanout
delayed block cleanout
using “commit SCN” of transaction slot
Query SCN이 TRN
CTL SCN보다 최신인가?
Ⅰ-3. Flow chart of delayed block cleanout
Before-image SCN이
Query SCN보다 최신인가?
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
<Inefficient delayed block cleanout> Undo Header
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 scn: 0x0000.0022d821
index state cflags wrap# uel scn dba
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022d829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022d832 0x01800121
Undo Block
buffer tsn: 6 rdba: 0x01800120 (6/288)
UNDO BLK:
xid: 0x0001.005.00000ad5 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc:
5(0x00000005)
uba: 0x0180011f.0485.02 ctl max scn: 0x0000.0022d818
prv tx scn: 0x0000.0022d821 txn start scn: scn: 0x0000.0022d831 logon user: 5
prev brb: 25166111 prev bcl: 0
Undo Block
buffer tsn: 6 rdba: 0x0180011f (6/287)
UNDO BLK:
xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x2 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc:
5(0x00000005)
*-----------------------------
uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022d811 prv tx scn:
0x0000.0022d818
txn start scn: scn: 0x0000.0022d828 logon user: 5
prev brb: 25166110 prev bcl: 0
Wrap 번호 비교
TRN CTL SCN을
Query SCN과 비교
Before image SCN을
Query SCN과 비교
해당 before image
SCN으로 적용
0x0ad6 ≠0x0ad8
• Query SCN: 0x0000.0022d811
• Wrap#: 0x0ad6 (itl의 xid)
1
2
3
4
d811 < d821
Query SCN TRN CTL SCN
d811 < d818
Query SCN TRN CTL SCN
d811 ≥ d811
Query SCN TRN CTL SCN
Ⅰ-3. Flow chart of delayed block cleanout
NO
NO
NO
Wrap 번호가 같은가?
해당 SCN 적용
Query SCN이 TRN
CTL SCN보다 최신인가?
Before-image SCN이
Query SCN보다 최신인가?
2
3
1
4
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Ⅰ. Transaction slot Before-image Chaining
Ⅰ-1. Questions
Ⅰ-2. Architecture of transaction slot before-image chaining
Ⅰ-3. Flow chart of delayed block cleanout
Ⅱ. Block cleanout Analysis
Ⅱ-1. Fast block cleanout (Fast commit)
Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot
Ⅱ-3. Efficient Delayed Block Cleanout
(Delayed block cleanout using “commit SCN” of TRN CTL)
Ⅱ-4. Inefficient Delayed Block Cleanout
(Delayed block cleanout using ”commit SCN” of transaction slot before-image chaining)
Table of Agenda
Oracle Deep Internal
Ⅱ. Block cleanout Analysis
Oracle Deep Internal
Ⅱ-1. Fast block cleanout (Fast commit)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Commit SCN
↓
9 (Committed)
10 (Active)
0x01 0x0008.013.
000018a8
1--U- Commit SCN
(Base#)
0x13 0x008004f8
0x008004f8.
00cf.06
버퍼 캐시의 10% 초과하지 않는 블록들은
세션 메모리 내에 리스트로 생성
Fast block cleanout은
“트랜잭션이 종료되는 시점에 Dirty블록에 관련된 트랜잭션의 정보를 정리하는 작업”
0x18a8
Ⅱ-1. Fast block cleanout (Fast commit)
Oracle Deep Internal
Ⅱ-2. Delayed block cleanout
using “commit SCN” of transaction slot
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Delayed block cleanout은
“커밋 시점에 클린아웃 되지 않은 블록들(변경하려는 블록의 수가 버퍼 캐시의 10%를 초과),
메모리에서 flush되어 cleanout 처리되지 않고 datafile에 기록된 블록들을 다음 세션에 의해 클린아웃 작업”
0x13 0x0080006c
0x01 0C--- Commit SCN0x008004f8
00cf.06
9 (Committed) Commit SCN0x18a8
0x0008.013.
000018a8
Row Lock
클린아웃 되지 않은 트랜잭션의 xid를 이용해 transaction table을 확인(트랜잭션 종료여부, SCN)후,
해당 ITL에 Lock byte 해제, SCN 설정, Flag를 C---로 변경 후 이에 대한 redo log를 생성한다.
Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot
Oracle Deep Internal
Ⅱ-3. Efficient Delayed Block Cleanout
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Upper bound commit은
“원래 commit이 일어난 시점의 SCN이어야 하지만 다른 트랜잭션에 의해 overwrite 되었을 경우,
cleanout 할 쿼리 SCN(818)부터 시작해서 원래 commit이 일어난 시점의 SCN(811) 사이에 있는 가장 높은 값(817)을 의미한다”
Upper bound commit
Upper bound commit
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
• Undo segment 10개 중 9개 offline, 1개만 online
• Undo segment의 34개 슬롯 중 32개 active, 2개만 사용 가능
시나리오
Update Table T1
Flush Buffer
Commit
Update & Commit
Update & Commit
Update & Commit
Update & Commit
Select Table T1
t1
t2
t3
S1 S2Time
Ⅱ-3. Efficient Delayed Block Cleanout
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Rows
1. 초기상태
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Undo Header
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Undo Block
ASCII HEXA code 41
=> Value ‘A’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Rows
ITL Undo Header
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Undo Header를
메모리에 적재
Undo Block
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Undo Block
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
chd 0x0014 슬롯을 사용할 예정이기
때문에 uba, TRN CTL SCN, 0x14 slot
SCN이 before-image로 저장
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
Undo Block
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Update된 undo header block은
TRN CTL uba에 before-image의 위치를 기록,
SCN에 이전 슬롯의 SCN을 기록
0x14 슬롯 갱신
(state, cflag, wrap#, scn)
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
Before image가 있는
Undo Block
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Block
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Block
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
ASCII HEXA code 42
=> Value ‘B’
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
3. alter system flush buffer_cache ;
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
flush
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
4. commit;
BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0x0014 0x0000.006e8ee4 0x0180011b
0x14 9 0x00 0x353b 0xffff 0x0000.006e8efd 0x0180011b
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
buffer tsn: 6 rdba: 0x0180011b (6/283)
UNDO BLK:
xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000
* Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005)
uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3
txn start scn: scn: 0x0000.006e8efa logon user: 5
prev brb: 25166108 prev bcl: 0
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
5. Undo Header Slot 재사용 (세션2에서 Update 첫 번째)
BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0014 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.32 scn: 0x0000.006e8ee4
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 10 0x80 0x3539 0x0005 0x0000.006e8f05 0x0180011d
0x14 9 0x00 0x353b 0xffff 0x0000.006e8efd 0x0180011b
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Session2> Update t2 set col2=‘B’;
Session2> Commit;
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
Undo Block
buffer tsn: 6 rdba: 0x0180011d (6/285)
UNDO BLK:
xid: 0x0006.004.00003539 seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x04 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Header
BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011d.1cc1.02 scn: 0x0000.006e8efd
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3539 0xffff 0x0000.006e8f06 0x0180011d
0x14 10 0x80 0x353c 0x0005 0x0000.006e8f0d 0x0180011e
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
6. Undo Header Slot 재사용 (세션2에서 Update 두 번째)
Session2> Update t2 set col2=‘B’;
Session2> Commit;
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Undo Block
buffer tsn: 6 rdba: 0x0180011e (6/286)
UNDO BLK:
xid: 0x0006.014.0000353c seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Block
Undo Header
BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0014 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011e.1cc1.02 scn: 0x0000.006e8f06
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 10 0x80 0x353a 0x0005 0x0000.006e8f15 0x0180011f
0x14 9 0x00 0x353c 0xffff 0x0000.006e8f0e 0x0180011e
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
buffer tsn: 6 rdba: 0x0180011f (6/287)
UNDO BLK:
xid: 0x0006.004.0000353a seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x04 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
51 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Session2> Update t2 set col2=‘B’;
Session2> Commit;
7. Undo Header Slot 재사용 (세션2에서 Update 세 번째)
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 3
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x353a 0xffff 0x0000.006e8f16 0x0180011f
0x14 10 0x80 0x353d 0x0005 0x0000.006e8f1c 0x01800130
Query SCN
8. Undo Header Slot 재사용 (세션2에서 Update 네 번째)
Undo Block
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b
0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b
buffer tsn: 6 rdba: 0x01800130 (6/304)
UNDO BLK:
xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Session2> Update t2 set col2=‘B’;
Session2> Commit;
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x647efe78) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x646aa000
st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f
0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130
9. select /*+ full(t1) */count(*) from t1 where rownum <= 1;
현재 시점 undo header block 의 TRN CTL SCN 값으로 cleanout.
BH (0x657f85c0) file#: 5 rdba: 0x01418413 (5/99347) class: 1 ba: 0x65788000
st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1
buffer tsn: 5 rdba: 0x01418413 (5/99347)
…
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
…
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Block
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f
0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130
buffer tsn: 6 rdba: 0x01800130 (6/304)
UNDO BLK:
xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Itl Xid Uba Flag Lck Scn/fsc
Wrap number가
다름
Query SCN은
0x0000.006e8f1c
ASCII HEXA code 42
=> Value ‘B’
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Begin cleaning out block ...
Block header dump: 0x01418413
…
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
WAIT #139971596639184: nam='db file sequential read' ela= 15 file#=6 block#=288 blocks=1 obj#=0
tim=1460423039184663
…
Block cleanout record, scn: 0xffff.ffffffff ver: 0x01 opt: 0x01, entries follow...
itli: 2 flg: 1 scn: 0x0000.006e8f0e
Block header dump: 0x01418413
…
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Undo header Block
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x647efe78) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x646aa000
st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 1
buffer tsn: 6 rdba: 0x01800120 (6/288)
…
TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e
…
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f
0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130
9. select /*+ full(t1) */count(*) from t1 where rownum <= 1;
현재 시점 undo header block 의 TRN CTL SCN 값으로 cleanout.
BH (0x657f85c0) file#: 5 rdba: 0x01418413 (5/99347) class: 1 ba: 0x65788000
st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1
buffer tsn: 5 rdba: 0x01418413 (5/99347)
…
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
…
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Block
Undo Header
buffer tsn: 6 rdba: 0x01800120 (6/288)
TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e
index state cflags wrap# uel scn dba
-----------------------------------------------------------------------------------------
0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f
0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130
buffer tsn: 6 rdba: 0x01800130 (6/304)
UNDO BLK:
xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005)
col 1: [2000]
52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Itl Xid Uba Flag Lck Scn/fsc
Wrap number가
다름
Query SCN은
0x0000.006e8f1c
ASCII HEXA code 42
=> Value ‘B’
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426
0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Oracle Deep Internal
Ⅱ-4. Inefficient Delayed Block Cleanout
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Update Table T1
Flush Buffer
Commit
Select Table T1
t1
t2
t4
S1 S2Time
t3
Update & Commit
Update & Commit
Update & Commit
Update & Commit
Set transaction
read only
Ⅱ-4. Inefficient delayed block cleanout
• Undo segment 10개 중 9개 offline, 1개만 online
• Undo segment의 34개 슬롯 중 32개 active, 2개만 사용 가능
시나리오
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Rows
1. 초기상태
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Undo Header
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Undo Block
ASCII HEXA code 41
=> Value ‘A’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Rows
ITL Undo Header
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Undo Header를
메모리에 적재
Undo Block
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Undo Header
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Undo Block
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
chd 0x0006 슬롯을 사용할 예정이기 때
문에 uba, TRN CTL SCN, 0x06 slot
SCN이 before-mage로 저장
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
Undo Block
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
Undo Header
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Update된 undo header block은
TRN CTL uba에 before-image의 위치를 기록,
SCN에 이전 슬롯의 SCN을 기록
0x06 슬롯 갱신
(state, cflag, wrap#, SCN)
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
Before-image가 있는
Undo Block
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Block
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
Undo Header
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Undo Block
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000
st: XCURRENT md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
Undo Header
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c
Rows
ITL
Rows
ITL
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 41
=> Value ‘A’
2. update t1 set col2='B';
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 41
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
3. alter system flush buffer_cache ;
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
flush
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
4. commit;
BH (0x66be9f68) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66a0e000
st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad3 0x0006 0x0000.0022c7ff 0x0180011d
0x06 9 0x00 0x0ad6 0xffff 0x0000.0022c811 0x0180011c
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Query SCN
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
5. Set transaction read only ;
Undo Header
Undo Block
<Read only 시점>
• 현재 세션 Commit 시점 이후 (0x0000.0022c811)
• 다른 세션 Commit 시점 이전 (0x0000.0022c818)
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d
0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000
* Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe
txn start SCN: SCN: 0x0000.0022c809 logon user: 5
prev brb: 25166108 prev bcl: 0
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
6. Undo Header Slot 재사용 (세션2에서 Update 첫 번째)
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011c.0485.31 SCN: 0x0000.0022c7ff
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c
buffer tsn: 6 rdba: 0x0180011c (6/284)
UNDO BLK:
xid: 0x0001.005.00000ad4 seq: 0x485 cnt: 0x32 irb: 0x32 icl: 0x0 flg: 0x0000
* Rec #0x31 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.09 ctl max SCN: 0x0000.0022c7fe prv tx SCN: 0x0000.0022c7ff
txn start SCN: SCN: 0x0000.0022c816 logon user: 5
prev brb: 25166109 prev bcl: 0
Session2> Update t2 set col2=‘B’;
Session2> Commit;
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
7. Undo Header Slot 재사용 (세션2에서 Update 두 번째)
Session2> Update t2 set col2=‘B’;
Session2> Commit;
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
buffer tsn: 6 rdba: 0x0180011e (6/286)
UNDO BLK:
xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x3 irb: 0x3 icl: 0x0 flg: 0x0000
* Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
uba: 0x0180011c.0485.31 ctl max SCN: 0x0000.0022c7ff prv tx SCN: 0x0000.0022c811
txn start SCN: SCN: 0x0000.0022c820 logon user: 5
prev brb: 25166108 prev bcl: 0
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
8. Undo Header Slot 재사용 (세션2에서 Update 세 번째)
Session2> Update t2 set col2=‘B’;
Session2> Commit;
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011f.0485.02 SCN: 0x0000.0022c818
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad5 0xffff 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f
buffer tsn: 6 rdba: 0x0180011f (6/287)
UNDO BLK:
xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x2 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
uba: 0x0180011e.0485.02 ctl max SCN: 0x0000.0022c811 prv tx SCN: 0x0000.0022c818
txn start SCN: SCN: 0x0000.0022c828 logon user: 5
prev brb: 25166110 prev bcl: 0
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
9. Undo Header Slot 재사용 (세션2에서 Update 네 번째)
Session2> Update t2 set col2=‘B’;
Session2> Commit;
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42 ASCII HEXA code 42
=> Value ‘B’
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
buffer tsn: 6 rdba: 0x01800120 (6/288)
UNDO BLK:
xid: 0x0001.005.00000ad5 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
uba: 0x0180011f.0485.02 ctl max SCN: 0x0000.0022c818 prv tx SCN: 0x0000.0022c821
txn start SCN: SCN: 0x0000.0022c831 logon user: 5
prev brb: 25166111 prev bcl: 0
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000
st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
10. select /*+ full(t1) */count(*) from t1 where rownum <= 1;
undo header block 의 CR을 만드는 과정에서 undo block read 발생함.
BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000
st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1
buffer tsn: 5 rdba: 0x014000e3 (5/227)
…
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
…
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Itl Xid Uba Flag Lck SCN/fsc
BH (0x673f4b40) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x67328000
st: CR md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
buffer tsn: 6 rdba: 0x01800121 (6/289)
UNDO BLK:
xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
Begin cleaning out block ...
Block header dump: 0x014000e3
…
Itl Xid Uba Flag Lck SCN/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
WAIT #140004262172792: nam='db file sequential read' ela= 9 file#=6 block#=352 blocks=1 obj#=0 tim=1459261058673224
WAIT #140004262172792: nam='db file sequential read' ela= 13 file#=6 block#=288 blocks=1 obj#=0 tim=1459261058676417
WAIT #140004262172792: nam='db file sequential read' ela= 10 file#=6 block#=287 blocks=1 obj#=0 tim=1459261058677687
…
Block cleanout record, SCN: 0x0000.0022c834 ver: 0x01 opt: 0x01, entries follow...
itli: 2 flg: 1 SCN: 0x0000.0022c811
Block header dump: 0x014000e3
…
Itl Xid Uba Flag Lck SCN/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Undo header Block
두 번째 update Undo Block
첫 번째 update Undo Block
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000
st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
10. select /*+ full(t1) */count(*) from t1 where rownum <= 1;
undo header block 의 CR을 만드는 과정에서 undo block read 발생함.
BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000
st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1
buffer tsn: 5 rdba: 0x014000e3 (5/227)
…
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
…
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Itl Xid Uba Flag Lck SCN/fsc
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
buffer tsn: 6 rdba: 0x01800121 (6/289)
UNDO BLK:
xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
Query SCN은
0x0000.0022c811
Wrap number가
다름
Begin cleaning out block ...
Block header dump: 0x014000e3
…
Itl Xid Uba Flag Lck SCN/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
WAIT #140004262172792: nam='db file sequential read' ela= 9 file#=6 block#=352 blocks=1 obj#=0 tim=1459261058673224
WAIT #140004262172792: nam='db file sequential read' ela= 13 file#=6 block#=288 blocks=1 obj#=0 tim=1459261058676417
WAIT #140004262172792: nam='db file sequential read' ela= 10 file#=6 block#=287 blocks=1 obj#=0 tim=1459261058677687
…
Block cleanout record, SCN: 0x0000.0022c834 ver: 0x01 opt: 0x01, entries follow...
itli: 2 flg: 1 SCN: 0x0000.0022c811
Block header dump: 0x014000e3
…
Itl Xid Uba Flag Lck SCN/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Undo header Block
두 번째 update Undo Block
첫 번째 update Undo Block
SCN: 0x0000.0022c821
SCN: 0x0000.0022c818
SCN: 0x0000.0022c811
SGA
Undo SegmentData Block
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000
st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
10. select /*+ full(t1) */count(*) from t1 where rownum <= 1;
undo header block 의 CR을 만드는 과정에서 undo block read 발생함.
BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000
st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1
buffer tsn: 5 rdba: 0x014000e3 (5/227)
…
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
…
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Itl Xid Uba Flag Lck SCN/fsc
ITL
Itl Xid Uba Flag Lck Scn/fsc
0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23
0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
Rows
block_row_dump:
tab 0, row 0, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [10] 31 20 20 20 20 20 20 20 20 20
col 1: [ 1] 42
Undo Header
Undo Block
buffer tsn: 6 rdba: 0x01800160 (6/352)
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x01800120.0486.02 SCN: 0x0000.0022c821
index state cflags wrap# uel SCN dba
0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120
0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121
buffer tsn: 6 rdba: 0x01800121 (6/289)
UNDO BLK:
xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000
* Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005)
1
BH (0x673f4b40) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x67328000
st: CR md: NULL tch: 1
buffer tsn: 6 rdba: 0x01800160 (6/352)
…
TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811
…
index state cflags wrap# uel SCN dba
-----------------------------------------------------------------------------------------
0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e
0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f
CR 블록 적용
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Oracle Deep Internal
Blog
Video
E-mail
NAVER http://cafe.naver.com/playexem
ITPUB http://blog.itpub.net/31135309/
Wordpress https://playexem.wordpress.com/
Slideshare http://www.slideshare.net/playexem
Youtube https://www.youtube.com/channel/UC5wKR_
-A0eL_Pn_EMzoauJg
Tudou http://www.tudou.com/home/maxgauge/
교육 문의 : 연구컨텐츠팀 김숙진
edu@ex-em.com

More Related Content

What's hot

Compiling Imperative and Object-Oriented Languages - Garbage Collection
Compiling Imperative and Object-Oriented Languages - Garbage CollectionCompiling Imperative and Object-Oriented Languages - Garbage Collection
Compiling Imperative and Object-Oriented Languages - Garbage CollectionGuido Wachsmuth
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsMathias Herberts
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersRiyaj Shamsudeen
 
Vhdl practical exam guide
Vhdl practical exam guideVhdl practical exam guide
Vhdl practical exam guideEslam Mohammed
 
Laboratory Report Sample
Laboratory Report SampleLaboratory Report Sample
Laboratory Report SampleMarkus Flicke
 
The Ring programming language version 1.9 book - Part 68 of 210
The Ring programming language version 1.9 book - Part 68 of 210The Ring programming language version 1.9 book - Part 68 of 210
The Ring programming language version 1.9 book - Part 68 of 210Mahmoud Samir Fayed
 
ch3-pv1-memory-management
ch3-pv1-memory-managementch3-pv1-memory-management
ch3-pv1-memory-managementyushiang fu
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorDaniel Roggen
 
370410176 moshell-commands
370410176 moshell-commands370410176 moshell-commands
370410176 moshell-commandsnanker phelge
 
了解IO协议栈
了解IO协议栈了解IO协议栈
了解IO协议栈Feng Yu
 
Demystifying cost based optimization
Demystifying cost based optimizationDemystifying cost based optimization
Demystifying cost based optimizationRiyaj Shamsudeen
 
The Ring programming language version 1.5.3 book - Part 68 of 184
The Ring programming language version 1.5.3 book - Part 68 of 184The Ring programming language version 1.5.3 book - Part 68 of 184
The Ring programming language version 1.5.3 book - Part 68 of 184Mahmoud Samir Fayed
 
Watching And Manipulating Your Network Traffic
Watching And Manipulating Your Network TrafficWatching And Manipulating Your Network Traffic
Watching And Manipulating Your Network TrafficJosiah Ritchie
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64FFRI, Inc.
 

What's hot (18)

Compiling Imperative and Object-Oriented Languages - Garbage Collection
Compiling Imperative and Object-Oriented Languages - Garbage CollectionCompiling Imperative and Object-Oriented Languages - Garbage Collection
Compiling Imperative and Object-Oriented Languages - Garbage Collection
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy Systems
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
 
Vhdl practical exam guide
Vhdl practical exam guideVhdl practical exam guide
Vhdl practical exam guide
 
Laboratory Report Sample
Laboratory Report SampleLaboratory Report Sample
Laboratory Report Sample
 
Sql2
Sql2Sql2
Sql2
 
The Ring programming language version 1.9 book - Part 68 of 210
The Ring programming language version 1.9 book - Part 68 of 210The Ring programming language version 1.9 book - Part 68 of 210
The Ring programming language version 1.9 book - Part 68 of 210
 
ch3-pv1-memory-management
ch3-pv1-memory-managementch3-pv1-memory-management
ch3-pv1-memory-management
 
W8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational ProcessorW8_2: Inside the UoS Educational Processor
W8_2: Inside the UoS Educational Processor
 
MySQLinsanity
MySQLinsanityMySQLinsanity
MySQLinsanity
 
370410176 moshell-commands
370410176 moshell-commands370410176 moshell-commands
370410176 moshell-commands
 
了解IO协议栈
了解IO协议栈了解IO协议栈
了解IO协议栈
 
Demystifying cost based optimization
Demystifying cost based optimizationDemystifying cost based optimization
Demystifying cost based optimization
 
The Ring programming language version 1.5.3 book - Part 68 of 184
The Ring programming language version 1.5.3 book - Part 68 of 184The Ring programming language version 1.5.3 book - Part 68 of 184
The Ring programming language version 1.5.3 book - Part 68 of 184
 
Watching And Manipulating Your Network Traffic
Watching And Manipulating Your Network TrafficWatching And Manipulating Your Network Traffic
Watching And Manipulating Your Network Traffic
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
Combo fix
Combo fixCombo fix
Combo fix
 
CARACTERES ASCII ENSAMBLADOR
CARACTERES ASCII ENSAMBLADORCARACTERES ASCII ENSAMBLADOR
CARACTERES ASCII ENSAMBLADOR
 

Viewers also liked

【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...EXEM
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)EXEM
 
Performance schema 설정
Performance schema 설정Performance schema 설정
Performance schema 설정EXEM
 
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
2009년 시무식 Apm
2009년 시무식 Apm2009년 시무식 Apm
2009년 시무식 ApmEXEM
 
밋업발표
밋업발표밋업발표
밋업발표진성 박
 
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 

Viewers also liked (12)

【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)
 
Performance schema 설정
Performance schema 설정Performance schema 설정
Performance schema 설정
 
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
test
testtest
test
 
2009년 시무식 Apm
2009년 시무식 Apm2009년 시무식 Apm
2009년 시무식 Apm
 
밋업발표
밋업발표밋업발표
밋업발표
 
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 10회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 9회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 5회 엑셈 수요 세미나 자료 연구컨텐츠팀
 

Similar to Oracle Deep Internal 4 (ver.2)

Kernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesKernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesAnne Nicolas
 
Introduction to Asic Design and VLSI Design
Introduction to Asic Design and VLSI DesignIntroduction to Asic Design and VLSI Design
Introduction to Asic Design and VLSI DesignPratik Gohel
 
The_ERICSSON_commands_listed_below_are_f (1) (1).pdf
The_ERICSSON_commands_listed_below_are_f (1) (1).pdfThe_ERICSSON_commands_listed_below_are_f (1) (1).pdf
The_ERICSSON_commands_listed_below_are_f (1) (1).pdfssuser340a0c
 
Dalls02950 1
Dalls02950 1Dalls02950 1
Dalls02950 1S BW
 
Network Jumbo Frame Config Guide
Network Jumbo Frame Config GuideNetwork Jumbo Frame Config Guide
Network Jumbo Frame Config GuideWoo Hyung Choi
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers iiKumar Kumar
 
overviev gyrocompass parameters
overviev gyrocompass parametersoverviev gyrocompass parameters
overviev gyrocompass parametersSergey Safronov
 
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...Chanwoo Choi
 
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_cCataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_cThuan Kieu
 
fdocuments.in_the-ericsson-commands.pdf
fdocuments.in_the-ericsson-commands.pdffdocuments.in_the-ericsson-commands.pdf
fdocuments.in_the-ericsson-commands.pdfSaidHaman
 

Similar to Oracle Deep Internal 4 (ver.2) (20)

Redo internals ppt
Redo internals pptRedo internals ppt
Redo internals ppt
 
crack satellite
crack satellite crack satellite
crack satellite
 
Kernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesKernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering Oopsies
 
Introduction to Asic Design and VLSI Design
Introduction to Asic Design and VLSI DesignIntroduction to Asic Design and VLSI Design
Introduction to Asic Design and VLSI Design
 
Architect Cheatsheet
Architect CheatsheetArchitect Cheatsheet
Architect Cheatsheet
 
The propeller
The propellerThe propeller
The propeller
 
Rac 12c optimization
Rac 12c optimizationRac 12c optimization
Rac 12c optimization
 
The_ERICSSON_commands_listed_below_are_f (1) (1).pdf
The_ERICSSON_commands_listed_below_are_f (1) (1).pdfThe_ERICSSON_commands_listed_below_are_f (1) (1).pdf
The_ERICSSON_commands_listed_below_are_f (1) (1).pdf
 
Dalls02950 1
Dalls02950 1Dalls02950 1
Dalls02950 1
 
Network Jumbo Frame Config Guide
Network Jumbo Frame Config GuideNetwork Jumbo Frame Config Guide
Network Jumbo Frame Config Guide
 
Day 20.3 frame relay
Day 20.3 frame relay Day 20.3 frame relay
Day 20.3 frame relay
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers ii
 
overviev gyrocompass parameters
overviev gyrocompass parametersoverviev gyrocompass parameters
overviev gyrocompass parameters
 
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...
OpenIot & ELC Europe 2016 Berlin - How to develop the ARM 64bit board, Samsun...
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_cCataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
 
Wiring cp1 e_s_analogicas
Wiring cp1 e_s_analogicasWiring cp1 e_s_analogicas
Wiring cp1 e_s_analogicas
 
Channelconfih s9
Channelconfih s9Channelconfih s9
Channelconfih s9
 
Flashback ITOUG
Flashback ITOUGFlashback ITOUG
Flashback ITOUG
 
fdocuments.in_the-ericsson-commands.pdf
fdocuments.in_the-ericsson-commands.pdffdocuments.in_the-ericsson-commands.pdf
fdocuments.in_the-ericsson-commands.pdf
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Oracle Deep Internal 4 (ver.2)

  • 1. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ver.2 (2016.07.18)
  • 2. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
  • 3. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅰ. Transaction slot Before-image Chaining Ⅰ-1. Questions Ⅰ-2. Architecture of transaction slot before-image chaining Ⅰ-3. Flow chart of delayed block cleanout Ⅱ. Block cleanout Analysis Ⅱ-1. Fast block cleanout (Fast commit) Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot Ⅱ-3. Efficient Delayed Block Cleanout (Delayed block cleanout using “commit SCN” of TRN CTL) Ⅱ-4. Inefficient Delayed Block Cleanout (Delayed block cleanout using ”commit SCN” of transaction slot before-image chaining) Table of Agenda
  • 4. Oracle Deep Internal Ⅰ. Transaction slot Before-image Chaining
  • 5. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
  • 6. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Select 시 db file sequential read가 반복적으로 수행되는 wait 현상이 대형 오라클 사이트에서 빈번하게 발생 File: Undo file Block: Undo block Ⅰ-1. Questions
  • 7. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Transaction slot의 commit scn을 data block itl의 scn/fsc 컬럼에 update 하는 것 Cleanout 이란 무엇인가? Question 1 Answer 1 Data blockData block BH (0x643fa1c8) file#: 5 rdba: 0x0140dcad (5/56493) class: 1 ba: 0x643b6000 st: XCURRENT md: EXCL fpin: 'kdswh11: kdst_fetch' tch: 1 Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x000a.000.00000534 0x018000d2.01e6.01 C--- 0 scn 0x0000.003dbe3a 0x02 0x0007.000.000004ed 0x018000a2.01d5.01 ---- 1 fsc 0x0000.00000000 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 BH (0x643fa1c8) file#: 5 rdba: 0x0140dcad (5/56493) class: 1 ba: 0x643b6000 st: XCURRENT md: EXCL fpin: 'kdswh11: kdst_fetch' tch: 1 Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x000a.000.00000534 0x018000d2.01e6.01 C--- 0 scn 0x0000.003dbe3a 0x02 0x0007.000.000004ed 0x018000a2.01d5.01 --U- 1 fsc 0x0000.003dbe4e tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Header index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------- 0x00 10 0x80 0x04ed 0x0000 0x0000.003dbe4e 0x018000a2 0x01 9 0x00 0x04ec 0x0002 0x0000.003d6d72 0x00000000 0x02 9 0x00 0x04ec 0x0003 0x0000.003d6d72 0x00000000 Transaction 상태 Cleanout 상태 Commit scn Commit scn 적용 전 Commit scn 적용 후 Transaction 상태 Ⅰ-1. Questions
  • 8. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 순식간에 완료된다. • 일부만 먼저 cleanout 하고 나머지는 나중에 cleanout하기 때문에 시간이 적게 소요된다. 만약 100억 건을 update 한 후에 Commit을 한다면, 100억 건에 대해서 모두 완료하기까지 시간이 얼마나 소요될까? Question 2 Answer 2 Ⅰ-1. Questions
  • 9. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo는 제한된 자원이기 때문에 트랜잭션 슬롯은 overwrite 된다. 나중에 사용하기 위해서 저장하고 있던 commit SCN은 어떻게 될까? Question 3 • Undo는 제한적인 자원이기 때문에 영원히 보관할 수 없고, 시간이 지나면 aging out 된다. • Undo slot의 before image가 chaining 되면서 저장된다. • (뒤의 슬라이드 참조) Answer 3 Ⅰ-1. Questions Undo Header index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------- 0x00 10 0x80 0x04ed 0x0000 0x0000.003dbe4e 0x018000a2 0x01 9 0x00 0x04ec 0x0002 0x0000.003d6d72 0x00000000 0x02 9 0x00 0x04ec 0x0003 0x0000.003d6d72 0x00000000 Commit scn
  • 10. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. UNDO BLK rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7 uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811 rdba: 0x0180011e (6/286) TRN CTL seq: 0x0485 chd: 0x0006 ctl: 0x0005 uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff index state cflags wrap# uel scn dba ------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c rdba: 0x01800160 (6/352) • Chd: chain header로 링크드 리스트의 시작, 다음 번 트랜잭션이 사용할 트랜잭션 테이블 슬롯 • Ctl: chain tail로 링크드 리스트의 끝, 해당 언두 세그 먼트에서 마지막으로 사용한 트랜잭션 테이블 슬롯 TRN CTL seq: 0x0485 chd: 0x0005 ctl: 0x0006 uba: 0x0180011e.0485.02 scn: 0x0000.0022c811 index state cflags wrap# uel scn dba --------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 10 0x80 0x0ad7 0xffff 0x0000.0022c821 0x0180011f rdba: 0x01800160 (6/352) Update된 undo header block은 TRN CTL uba에 before-image의 위 치를 기록하고, SCN에 이전 슬롯의 SCN을 기록 2 file#=6 block#=352 Ⅰ-2. Architecture of transaction slot before-image chaining (1/3) chd 0x0006 슬롯을 사용할 예정이기 때문에 uba, trn ctl SCN, 0x06 slot SCN이 before-image로 저장 1 Before-image Update 2 0x06 슬롯 갱신 (state 10, cflags 0x80, SCN 갱신) 3 1 11 2
  • 11. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅰ-2. Architecture of transaction slot before-image chaining (2/3) TRN CTL seq: 0x0485 chd: 0x0006 ctl: 0x0005 uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff index state cflags wrap# uel scn dba ------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c rdba: 0x01800160 (6/352) TRN CTL seq: 0x0485 chd: 0x0005 ctl: 0x0006 uba: 0x0180011e.0485.02 scn: 0x0000.0022c811 index state cflags wrap# uel scn dba ------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f rdba: 0x01800160 (6/352) UNDO BLK rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7 uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811 rdba: 0x0180011e (6/286) Before-image UNDO BLK rdba: 0x0180011f seq: 0x485 Rec # 0x2 slt: 0x05 xid: 0x0001.006.00000ad7 uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022c811 prv tx scn: 0x0000.0022c818 rdba: 0x0180011f (6/287) chd 0x0005 슬롯을 사용할 예정이기 때문에 uba, trn ctl SCN, 0x05 slot SCN이 before-image로 저장 1 1 1 TRN CTL seq: 0x0485 chd: 0x0006 ctl: 0x0005 uba: 0x0180011f.0485.02 scn: 0x0000.0022c818 index state cflags wrap# uel scn dba --------------------------------------------------------------------------- 0x05 10 0x80 0x0ad5 0xffff 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f rdba: 0x01800160 (6/352) Update Update된 undo header block은 TRN CTL uba에 before-image의 위치를 기록하고, SCN에 이전 슬롯의 SCN을 기록 2 2 2 1 0x05 슬롯 갱신 (state 10, cflags 0x80, SCN 갱신) 3
  • 12. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅰ-2. Architecture of transaction slot before-image chaining (3/3) TRN CTL seq: 0x0485 chd: 0x0006 ctl: 0x0005 uba: 0x0180011c.0485.31 scn: 0x0000.0022c7ff index state cflags wrap# uel scn dba ------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c rdba: 0x01800160 (6/352) TRN CTL seq: 0x0485 chd: 0x0005 ctl: 0x0006 uba: 0x0180011e.0485.02 scn: 0x0000.0022c811 index state cflags wrap# uel scn dba ------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f rdba: 0x01800160 (6/352) UNDO BLK rdba: 0x0180011e seq: 0x485 Rec # 0x2 slt: 0x06 xid: 0x0001.006.00000ad7 uba: 0x0180011c.0485.31 ctl max scn: 0x0000.0022c7ff prv tx scn: 0x0000.0022c811 rdba: 0x0180011e (6/286) Before-image UNDO BLK rdba: 0x0180011f seq: 0x485 Rec # 0x2 slt: 0x05 xid: 0x0001.006.00000ad7 uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022c811 prv tx scn: 0x0000.0022c818 rdba: 0x0180011f (6/287) TRN CTL seq: 0x0485 chd: 0x0006 ctl: 0x0005 uba: 0x0180011f.0485.02 scn: 0x0000.0022c818 index state cflags wrap# uel scn dba --------------------------------------------------------------------------- 0x05 9 0x00 0x0ad5 0xffff 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f rdba: 0x01800160 (6/352) UNDO BLK rdba: 0x01800120 seq: 0x486 Rec # 0x2 slt: 0x06 xid: 0x0001.005.00000ad5 uba: 0x0180011f.0485.02 ctl max scn: 0x0000.0022c818 prv tx scn: 0x0000.0022c821 rdba: 0x01800120 (6/288) chd 0x0006 슬롯을 사용할 예정이기 때문에 uba, trn ctl SCN, 0x06 slot SCN이 before-image로 저장 1 1 1 1 TRN CTL seq: 0x0486 chd: 0x0005 ctl: 0x0006 uba: 0x01800120.0486.02 scn: 0x0000.0022c821 index state cflags wrap# uel scn dba -------------------------------------------------------------------------- 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 10 0x80 0x0ad8 0xffff 0x0000.0022c832 0x01800121 rdba: 0x01800160 (6/352) Update Update된 undo header block은 TRN CTL uba에 before-image의 위치를 기록 하고, SCN에 이전 슬롯의 SCN을 기록 2 0x06 슬롯 갱신 (state 10, cflags 0x80, SCN 갱신) 3 2 2 Endless loop..
  • 13. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. YES NO NO YES YES NO Wrap 번호가 같은가? TRN CTL SCN 적용 Before-image SCN과 비교 반복 수행 해당 SCN 적용 해당 SCN 적용 <Delayed Block cleanout 작업> Efficient delayed block cleanout Inefficient delayed block cleanout delayed block cleanout using “commit SCN” of transaction slot Query SCN이 TRN CTL SCN보다 최신인가? Ⅰ-3. Flow chart of delayed block cleanout Before-image SCN이 Query SCN보다 최신인가?
  • 14. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. <Inefficient delayed block cleanout> Undo Header buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 scn: 0x0000.0022d821 index state cflags wrap# uel scn dba 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022d829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022d832 0x01800121 Undo Block buffer tsn: 6 rdba: 0x01800120 (6/288) UNDO BLK: xid: 0x0001.005.00000ad5 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) uba: 0x0180011f.0485.02 ctl max scn: 0x0000.0022d818 prv tx scn: 0x0000.0022d821 txn start scn: scn: 0x0000.0022d831 logon user: 5 prev brb: 25166111 prev bcl: 0 Undo Block buffer tsn: 6 rdba: 0x0180011f (6/287) UNDO BLK: xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x2 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) *----------------------------- uba: 0x0180011e.0485.02 ctl max scn: 0x0000.0022d811 prv tx scn: 0x0000.0022d818 txn start scn: scn: 0x0000.0022d828 logon user: 5 prev brb: 25166110 prev bcl: 0 Wrap 번호 비교 TRN CTL SCN을 Query SCN과 비교 Before image SCN을 Query SCN과 비교 해당 before image SCN으로 적용 0x0ad6 ≠0x0ad8 • Query SCN: 0x0000.0022d811 • Wrap#: 0x0ad6 (itl의 xid) 1 2 3 4 d811 < d821 Query SCN TRN CTL SCN d811 < d818 Query SCN TRN CTL SCN d811 ≥ d811 Query SCN TRN CTL SCN Ⅰ-3. Flow chart of delayed block cleanout NO NO NO Wrap 번호가 같은가? 해당 SCN 적용 Query SCN이 TRN CTL SCN보다 최신인가? Before-image SCN이 Query SCN보다 최신인가? 2 3 1 4
  • 15. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Ⅰ. Transaction slot Before-image Chaining Ⅰ-1. Questions Ⅰ-2. Architecture of transaction slot before-image chaining Ⅰ-3. Flow chart of delayed block cleanout Ⅱ. Block cleanout Analysis Ⅱ-1. Fast block cleanout (Fast commit) Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot Ⅱ-3. Efficient Delayed Block Cleanout (Delayed block cleanout using “commit SCN” of TRN CTL) Ⅱ-4. Inefficient Delayed Block Cleanout (Delayed block cleanout using ”commit SCN” of transaction slot before-image chaining) Table of Agenda
  • 16. Oracle Deep Internal Ⅱ. Block cleanout Analysis
  • 17. Oracle Deep Internal Ⅱ-1. Fast block cleanout (Fast commit)
  • 18. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Commit SCN ↓ 9 (Committed) 10 (Active) 0x01 0x0008.013. 000018a8 1--U- Commit SCN (Base#) 0x13 0x008004f8 0x008004f8. 00cf.06 버퍼 캐시의 10% 초과하지 않는 블록들은 세션 메모리 내에 리스트로 생성 Fast block cleanout은 “트랜잭션이 종료되는 시점에 Dirty블록에 관련된 트랜잭션의 정보를 정리하는 작업” 0x18a8 Ⅱ-1. Fast block cleanout (Fast commit)
  • 19. Oracle Deep Internal Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot
  • 20. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Delayed block cleanout은 “커밋 시점에 클린아웃 되지 않은 블록들(변경하려는 블록의 수가 버퍼 캐시의 10%를 초과), 메모리에서 flush되어 cleanout 처리되지 않고 datafile에 기록된 블록들을 다음 세션에 의해 클린아웃 작업” 0x13 0x0080006c 0x01 0C--- Commit SCN0x008004f8 00cf.06 9 (Committed) Commit SCN0x18a8 0x0008.013. 000018a8 Row Lock 클린아웃 되지 않은 트랜잭션의 xid를 이용해 transaction table을 확인(트랜잭션 종료여부, SCN)후, 해당 ITL에 Lock byte 해제, SCN 설정, Flag를 C---로 변경 후 이에 대한 redo log를 생성한다. Ⅱ-2. Delayed block cleanout using “commit SCN” of transaction slot
  • 21. Oracle Deep Internal Ⅱ-3. Efficient Delayed Block Cleanout
  • 22. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Upper bound commit은 “원래 commit이 일어난 시점의 SCN이어야 하지만 다른 트랜잭션에 의해 overwrite 되었을 경우, cleanout 할 쿼리 SCN(818)부터 시작해서 원래 commit이 일어난 시점의 SCN(811) 사이에 있는 가장 높은 값(817)을 의미한다” Upper bound commit Upper bound commit
  • 23. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. • Undo segment 10개 중 9개 offline, 1개만 online • Undo segment의 34개 슬롯 중 32개 active, 2개만 사용 가능 시나리오 Update Table T1 Flush Buffer Commit Update & Commit Update & Commit Update & Commit Update & Commit Select Table T1 t1 t2 t3 S1 S2Time Ⅱ-3. Efficient Delayed Block Cleanout
  • 24. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Rows 1. 초기상태 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Undo Header block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Undo Block ASCII HEXA code 41 => Value ‘A’
  • 25. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Rows ITL Undo Header block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Undo Header를 메모리에 적재 Undo Block ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 26. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Undo Block buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 chd 0x0014 슬롯을 사용할 예정이기 때문에 uba, TRN CTL SCN, 0x14 slot SCN이 before-image로 저장 Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 27. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b Undo Block buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Update된 undo header block은 TRN CTL uba에 before-image의 위치를 기록, SCN에 이전 슬롯의 SCN을 기록 0x14 슬롯 갱신 (state, cflag, wrap#, scn) Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ Before image가 있는 Undo Block 2. update t1 set col2='B';
  • 28. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Block buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 29. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Block buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 BH (0x63fe3de8) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63d6e000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0004 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.1cc1.05 scn: 0x0000.006e8ee1 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353a 0x0004 0x0000.006e8ee3 0x0180011c Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 30. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 3. alter system flush buffer_cache ; Undo Header Undo Block buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 flush ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 31. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 4. commit; BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0x0014 0x0000.006e8ee4 0x0180011b 0x14 9 0x00 0x353b 0xffff 0x0000.006e8efd 0x0180011b Undo Header Undo Block buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b buffer tsn: 6 rdba: 0x0180011b (6/283) UNDO BLK: xid: 0x0006.014.0000353b seq: 0x1cc1 cnt: 0x31 irb: 0x31 icl: 0x0 flg: 0x0000 * Rec #0xa slt: 0x14 objn: 78003(0x000130b3) objd: 78003 tblspc: 5(0x00000005) uba: 0x0180011c.1cc1.05 ctl max scn: 0x0000.006e8ee1 prv tx scn: 0x0000.006e8ee3 txn start scn: scn: 0x0000.006e8efa logon user: 5 prev brb: 25166108 prev bcl: 0 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 32. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 5. Undo Header Slot 재사용 (세션2에서 Update 첫 번째) BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0014 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.32 scn: 0x0000.006e8ee4 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 10 0x80 0x3539 0x0005 0x0000.006e8f05 0x0180011d 0x14 9 0x00 0x353b 0xffff 0x0000.006e8efd 0x0180011b ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Session2> Update t2 set col2=‘B’; Session2> Commit; Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b Undo Block buffer tsn: 6 rdba: 0x0180011d (6/285) UNDO BLK: xid: 0x0006.004.00003539 seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x04 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
  • 33. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Header BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011d.1cc1.02 scn: 0x0000.006e8efd … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3539 0xffff 0x0000.006e8f06 0x0180011d 0x14 10 0x80 0x353c 0x0005 0x0000.006e8f0d 0x0180011e buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b 6. Undo Header Slot 재사용 (세션2에서 Update 두 번째) Session2> Update t2 set col2=‘B’; Session2> Commit; ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Undo Block buffer tsn: 6 rdba: 0x0180011e (6/286) UNDO BLK: xid: 0x0006.014.0000353c seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
  • 34. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Block Undo Header BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 2 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc1 chd: 0x0014 ctl: 0x0014 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011e.1cc1.02 scn: 0x0000.006e8f06 … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 10 0x80 0x353a 0x0005 0x0000.006e8f15 0x0180011f 0x14 9 0x00 0x353c 0xffff 0x0000.006e8f0e 0x0180011e buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b buffer tsn: 6 rdba: 0x0180011f (6/287) UNDO BLK: xid: 0x0006.004.0000353a seq: 0x1cc1 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x04 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 51 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Session2> Update t2 set col2=‘B’; Session2> Commit; 7. Undo Header Slot 재사용 (세션2에서 Update 세 번째) ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 35. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x637f5020) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x63730000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 3 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x353a 0xffff 0x0000.006e8f16 0x0180011f 0x14 10 0x80 0x353d 0x0005 0x0000.006e8f1c 0x01800130 Query SCN 8. Undo Header Slot 재사용 (세션2에서 Update 네 번째) Undo Block Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc1 chd: 0x0004 ctl: 0x0004 inc: 0x00000000 nfb: 0x0000 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011b.1cc1.0a scn: 0x0000.006e8ee3 index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x3538 0xffff 0x0000.006e8ee4 0x0180011b 0x14 10 0x80 0x353b 0x0005 0x0000.006e8efa 0x0180011b buffer tsn: 6 rdba: 0x01800130 (6/304) UNDO BLK: xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Session2> Update t2 set col2=‘B’; Session2> Commit;
  • 36. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x647efe78) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x646aa000 st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f 0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130 9. select /*+ full(t1) */count(*) from t1 where rownum <= 1; 현재 시점 undo header block 의 TRN CTL SCN 값으로 cleanout. BH (0x657f85c0) file#: 5 rdba: 0x01418413 (5/99347) class: 1 ba: 0x65788000 st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 buffer tsn: 5 rdba: 0x01418413 (5/99347) … 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 … block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Block Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f 0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130 buffer tsn: 6 rdba: 0x01800130 (6/304) UNDO BLK: xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Itl Xid Uba Flag Lck Scn/fsc Wrap number가 다름 Query SCN은 0x0000.006e8f1c ASCII HEXA code 42 => Value ‘B’ ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Begin cleaning out block ... Block header dump: 0x01418413 … Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 WAIT #139971596639184: nam='db file sequential read' ela= 15 file#=6 block#=288 blocks=1 obj#=0 tim=1460423039184663 … Block cleanout record, scn: 0xffff.ffffffff ver: 0x01 opt: 0x01, entries follow... itli: 2 flg: 1 scn: 0x0000.006e8f0e Block header dump: 0x01418413 … Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Undo header Block
  • 37. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x647efe78) file#: 6 rdba: 0x01800120 (6/288) class: 27 ba: 0x646aa000 st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 1 buffer tsn: 6 rdba: 0x01800120 (6/288) … TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e … index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f 0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130 9. select /*+ full(t1) */count(*) from t1 where rownum <= 1; 현재 시점 undo header block 의 TRN CTL SCN 값으로 cleanout. BH (0x657f85c0) file#: 5 rdba: 0x01418413 (5/99347) class: 1 ba: 0x65788000 st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 buffer tsn: 5 rdba: 0x01418413 (5/99347) … 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 C-U- 0 scn 0x0000.006e8f0e 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 … block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Block Undo Header buffer tsn: 6 rdba: 0x01800120 (6/288) TRN CTL:: seq: 0x1cc2 chd: 0x0004 ctl: 0x0014 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.1cc1.02 scn: 0x0000.006e8f0e index state cflags wrap# uel scn dba ----------------------------------------------------------------------------------------- 0x04 9 0x00 0x353a 0x0014 0x0000.006e8f16 0x0180011f 0x14 9 0x00 0x353d 0xffff 0x0000.006e8f1e 0x01800130 buffer tsn: 6 rdba: 0x01800130 (6/304) UNDO BLK: xid: 0x0006.014.0000353d seq: 0x1cc2 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x14 objn: 78004(0x000130b4) objd: 78004 tblspc: 5(0x00000005) col 1: [2000] 52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Itl Xid Uba Flag Lck Scn/fsc Wrap number가 다름 Query SCN은 0x0000.006e8f1c ASCII HEXA code 42 => Value ‘B’ ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x002c.002.000000b4 0x00000000.0000.00 C--- 0 scn 0x0000.006e8426 0x02 0x0006.014.0000353b 0x0180011b.1cc1.28 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 38. Oracle Deep Internal Ⅱ-4. Inefficient Delayed Block Cleanout
  • 39. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Update Table T1 Flush Buffer Commit Select Table T1 t1 t2 t4 S1 S2Time t3 Update & Commit Update & Commit Update & Commit Update & Commit Set transaction read only Ⅱ-4. Inefficient delayed block cleanout • Undo segment 10개 중 9개 offline, 1개만 online • Undo segment의 34개 슬롯 중 32개 active, 2개만 사용 가능 시나리오
  • 40. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Rows 1. 초기상태 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Undo Header block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Undo Block ASCII HEXA code 41 => Value ‘A’
  • 41. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Rows ITL Undo Header block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Undo Header를 메모리에 적재 Undo Block ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 42. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Undo Header buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Undo Block buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 chd 0x0006 슬롯을 사용할 예정이기 때 문에 uba, TRN CTL SCN, 0x06 slot SCN이 before-mage로 저장 Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 43. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c Undo Block buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 Undo Header buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Update된 undo header block은 TRN CTL uba에 before-image의 위치를 기록, SCN에 이전 슬롯의 SCN을 기록 0x06 슬롯 갱신 (state, cflag, wrap#, SCN) Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ Before-image가 있는 Undo Block 2. update t1 set col2='B';
  • 44. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Block buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c Undo Header buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B';
  • 45. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Undo Block buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 BH (0x663ea0a0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66210000 st: XCURRENT md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c Undo Header buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.05 SCN: 0x0000.0022c7fb index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad5 0x0005 0x0000.0022c7fe 0x0180011c Rows ITL Rows ITL block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 41 => Value ‘A’ 2. update t1 set col2='B'; block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 41 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001e.01b.0000000d 0x00000000.0000.00 C--- 0 SCN 0x0000.002263d9 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 ASCII HEXA code 42 => Value ‘B’
  • 46. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 3. alter system flush buffer_cache ; Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 flush ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 47. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 4. commit; BH (0x66be9f68) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x66a0e000 st: XCURRENT md: NULL fpin: 'ktuwh61: ktugus:ktucmt' tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad3 0x0006 0x0000.0022c7ff 0x0180011d 0x06 9 0x00 0x0ad6 0xffff 0x0000.0022c811 0x0180011c Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Query SCN
  • 48. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 5. Set transaction read only ; Undo Header Undo Block <Read only 시점> • 현재 세션 Commit 시점 이후 (0x0000.0022c811) • 다른 세션 Commit 시점 이전 (0x0000.0022c818) ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0005 inc: 0x00000000 nfb: 0x0001 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.09 SCN: 0x0000.0022c7fe index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad3 0xffff 0x0000.0022c7ff 0x0180011d 0x06 10 0x80 0x0ad6 0x0005 0x0000.0022c809 0x0180011c buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.006.00000ad6 seq: 0x485 cnt: 0x30 irb: 0x30 icl: 0x0 flg: 0x0000 * Rec #0x9 slt: 0x06 objn: 70145(0x00011201) objd: 70145 tblspc: 5(0x00000005) uba: 0x0180011c.0485.05 ctl max SCN: 0x0000.0022c7fb prv tx SCN: 0x0000.0022c7fe txn start SCN: SCN: 0x0000.0022c809 logon user: 5 prev brb: 25166108 prev bcl: 0
  • 49. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 6. Undo Header Slot 재사용 (세션2에서 Update 첫 번째) Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011c.0485.31 SCN: 0x0000.0022c7ff index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad4 0xffff 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad6 0x0005 0x0000.0022c811 0x0180011c buffer tsn: 6 rdba: 0x0180011c (6/284) UNDO BLK: xid: 0x0001.005.00000ad4 seq: 0x485 cnt: 0x32 irb: 0x32 icl: 0x0 flg: 0x0000 * Rec #0x31 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) uba: 0x0180011c.0485.09 ctl max SCN: 0x0000.0022c7fe prv tx SCN: 0x0000.0022c7ff txn start SCN: SCN: 0x0000.0022c816 logon user: 5 prev brb: 25166109 prev bcl: 0 Session2> Update t2 set col2=‘B’; Session2> Commit; ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 50. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 7. Undo Header Slot 재사용 (세션2에서 Update 두 번째) Session2> Update t2 set col2=‘B’; Session2> Commit; ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0485 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f buffer tsn: 6 rdba: 0x0180011e (6/286) UNDO BLK: xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x3 irb: 0x3 icl: 0x0 flg: 0x0000 * Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) uba: 0x0180011c.0485.31 ctl max SCN: 0x0000.0022c7ff prv tx SCN: 0x0000.0022c811 txn start SCN: SCN: 0x0000.0022c820 logon user: 5 prev brb: 25166108 prev bcl: 0
  • 51. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 8. Undo Header Slot 재사용 (세션2에서 Update 세 번째) Session2> Update t2 set col2=‘B’; Session2> Commit; Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0006 ctl: 0x0005 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011f.0485.02 SCN: 0x0000.0022c818 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad5 0xffff 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad7 0x0005 0x0000.0022c821 0x0180011f buffer tsn: 6 rdba: 0x0180011f (6/287) UNDO BLK: xid: 0x0001.006.00000ad7 seq: 0x485 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x2 slt: 0x05 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) uba: 0x0180011e.0485.02 ctl max SCN: 0x0000.0022c811 prv tx SCN: 0x0000.0022c818 txn start SCN: SCN: 0x0000.0022c828 logon user: 5 prev brb: 25166110 prev bcl: 0 ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’
  • 52. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 9. Undo Header Slot 재사용 (세션2에서 Update 네 번째) Session2> Update t2 set col2=‘B’; Session2> Commit; ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 ASCII HEXA code 42 => Value ‘B’ Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 buffer tsn: 6 rdba: 0x01800120 (6/288) UNDO BLK: xid: 0x0001.005.00000ad5 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x2 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) uba: 0x0180011f.0485.02 ctl max SCN: 0x0000.0022c818 prv tx SCN: 0x0000.0022c821 txn start SCN: SCN: 0x0000.0022c831 logon user: 5 prev brb: 25166111 prev bcl: 0
  • 53. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000 st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 … index state cflags wrap# uel SCN dba ----------------------------------------------------------------- 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 10. select /*+ full(t1) */count(*) from t1 where rownum <= 1; undo header block 의 CR을 만드는 과정에서 undo block read 발생함. BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000 st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 buffer tsn: 5 rdba: 0x014000e3 (5/227) … 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 … block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Itl Xid Uba Flag Lck SCN/fsc BH (0x673f4b40) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x67328000 st: CR md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811 … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 buffer tsn: 6 rdba: 0x01800121 (6/289) UNDO BLK: xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) Begin cleaning out block ... Block header dump: 0x014000e3 … Itl Xid Uba Flag Lck SCN/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 WAIT #140004262172792: nam='db file sequential read' ela= 9 file#=6 block#=352 blocks=1 obj#=0 tim=1459261058673224 WAIT #140004262172792: nam='db file sequential read' ela= 13 file#=6 block#=288 blocks=1 obj#=0 tim=1459261058676417 WAIT #140004262172792: nam='db file sequential read' ela= 10 file#=6 block#=287 blocks=1 obj#=0 tim=1459261058677687 … Block cleanout record, SCN: 0x0000.0022c834 ver: 0x01 opt: 0x01, entries follow... itli: 2 flg: 1 SCN: 0x0000.0022c811 Block header dump: 0x014000e3 … Itl Xid Uba Flag Lck SCN/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Undo header Block 두 번째 update Undo Block 첫 번째 update Undo Block
  • 54. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000 st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 … index state cflags wrap# uel SCN dba ----------------------------------------------------------------- 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 10. select /*+ full(t1) */count(*) from t1 where rownum <= 1; undo header block 의 CR을 만드는 과정에서 undo block read 발생함. BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000 st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 buffer tsn: 5 rdba: 0x014000e3 (5/227) … 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 … block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Itl Xid Uba Flag Lck SCN/fsc ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 buffer tsn: 6 rdba: 0x01800121 (6/289) UNDO BLK: xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) Query SCN은 0x0000.0022c811 Wrap number가 다름 Begin cleaning out block ... Block header dump: 0x014000e3 … Itl Xid Uba Flag Lck SCN/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 WAIT #140004262172792: nam='db file sequential read' ela= 9 file#=6 block#=352 blocks=1 obj#=0 tim=1459261058673224 WAIT #140004262172792: nam='db file sequential read' ela= 13 file#=6 block#=288 blocks=1 obj#=0 tim=1459261058676417 WAIT #140004262172792: nam='db file sequential read' ela= 10 file#=6 block#=287 blocks=1 obj#=0 tim=1459261058677687 … Block cleanout record, SCN: 0x0000.0022c834 ver: 0x01 opt: 0x01, entries follow... itli: 2 flg: 1 SCN: 0x0000.0022c811 Block header dump: 0x014000e3 … Itl Xid Uba Flag Lck SCN/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Undo header Block 두 번째 update Undo Block 첫 번째 update Undo Block SCN: 0x0000.0022c821 SCN: 0x0000.0022c818 SCN: 0x0000.0022c811
  • 55. SGA Undo SegmentData Block © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. BH (0x623e85d0) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x621e4000 st: XCURRENT md: NULL fpin: 'ktuwh05: ktugct' tch: 0 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 … index state cflags wrap# uel SCN dba ----------------------------------------------------------------- 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 10. select /*+ full(t1) */count(*) from t1 where rownum <= 1; undo header block 의 CR을 만드는 과정에서 undo block read 발생함. BH (0x66bf7720) file#: 5 rdba: 0x014000e3 (5/227) class: 1 ba: 0x66b70000 st: XCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 buffer tsn: 5 rdba: 0x014000e3 (5/227) … 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 C-U- 0 SCN 0x0000.0022c811 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 … block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x0 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Itl Xid Uba Flag Lck SCN/fsc ITL Itl Xid Uba Flag Lck Scn/fsc 0x01 0x001c.005.00000010 0x00000000.0000.00 C--- 0 SCN 0x0000.0022bf23 0x02 0x0001.006.00000ad6 0x0180011c.0485.27 ---- 3 fsc 0x0000.00000000 0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 Rows block_row_dump: tab 0, row 0, @0x1f70 tl: 16 fb: --H-FL-- lb: 0x2 cc: 2 col 0: [10] 31 20 20 20 20 20 20 20 20 20 col 1: [ 1] 42 Undo Header Undo Block buffer tsn: 6 rdba: 0x01800160 (6/352) TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x01800120.0486.02 SCN: 0x0000.0022c821 index state cflags wrap# uel SCN dba 0x05 9 0x00 0x0ad5 0x0006 0x0000.0022c829 0x01800120 0x06 9 0x00 0x0ad8 0xffff 0x0000.0022c832 0x01800121 buffer tsn: 6 rdba: 0x01800121 (6/289) UNDO BLK: xid: 0x0001.006.00000ad8 seq: 0x486 cnt: 0x1 irb: 0x1 icl: 0x0 flg: 0x0000 * Rec #0x1 slt: 0x06 objn: 70146(0x00011202) objd: 70146 tblspc: 5(0x00000005) 1 BH (0x673f4b40) file#: 6 rdba: 0x01800160 (6/352) class: 17 ba: 0x67328000 st: CR md: NULL tch: 1 buffer tsn: 6 rdba: 0x01800160 (6/352) … TRN CTL:: seq: 0x0486 chd: 0x0005 ctl: 0x0006 inc: 0x00000000 nfb: 0x0002 mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0180011e.0485.02 SCN: 0x0000.0022c811 … index state cflags wrap# uel SCN dba ----------------------------------------------------------------------------------------- 0x05 9 0x00 0x0ad4 0x0006 0x0000.0022c818 0x0180011e 0x06 9 0x00 0x0ad7 0xffff 0x0000.0022c821 0x0180011f CR 블록 적용
  • 56. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Oracle Deep Internal Blog Video E-mail NAVER http://cafe.naver.com/playexem ITPUB http://blog.itpub.net/31135309/ Wordpress https://playexem.wordpress.com/ Slideshare http://www.slideshare.net/playexem Youtube https://www.youtube.com/channel/UC5wKR_ -A0eL_Pn_EMzoauJg Tudou http://www.tudou.com/home/maxgauge/ 교육 문의 : 연구컨텐츠팀 김숙진 edu@ex-em.com