oracle 塊延遲清除(delayed block cleanout) 理解
為了保證事務的回退和滿足多使用者的CR, oracle引入了undo 機制, 由於undo是迴圈使用的,在一個事務完成過程中,它與redo相互配合,其中undo在一次事務中需要完成以下工作:
(1) Transaction 開始前 回滾段獲取一個ITL(事務槽),分配空間, 記錄事務資訊
(2) Transaction 提交後,redo完成記錄,同時還清除回滾段的事務資訊 包括行級鎖,ITL資訊(commit 標誌,SCN等)
清除這些事務段的資訊的過程就叫做 塊清除, 在完成塊清除時, 我們本事務修改的資料塊就會存在兩種可能(1) 所有的資料塊還儲存在 buffer cache 中, (2)部分資料塊或者是全部資料塊由於LRU管理已經被刷出了buffer cache。oracle為了考慮到塊清除的成本,以及效能,會作以下兩種方式的塊清除處理:
(1) 快速塊清除(fast block cleanout), 當事務修改的資料庫全部儲存在buffer cache 並且修改資料塊的資料量沒有超過 cache buffer 的 10%,快速清除事務資訊。
(2) 延遲塊清除(delayed block cleanout) 當修改的資料塊的閥值超過10% 或者本次事務相關的資料塊已經被刷出了 buffer cache, oracle 會下次訪問此block 時再清除事務資訊。
下面透過一個實驗測試,來熟悉一下delayed block cleanout的處理
SQL> select * from v$version ;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 – Production
SQL> show parameter undo;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> conn gabriel/gabriel
Connected.
SQL> create table test_delayed as select * from user_objects;
Table created.
SQL> select count(1) from test_delayed;
COUNT(1)
----------
3
SQL> update test_delayed set object_id=1 where object_name='TEST_REDO';
1 row updated.
SQL> update test_delayed set object_id=2 where object_name='TEST_DELAYED';
1 row updated.
SQL> -----不提交
查詢回滾段資訊:
SQL> col segment_name for a20;
select owner,segment_name,SEGMENT_ID,FILE_ID,BLOCK_ID,STATUS
SQL> tablespace_name from dba_rollback_segs;
2
OWNER SEGMENT_NAME SEGMENT_ID FILE_ID BLOCK_ID TABLESPACE_NAME
------ -------------------- ---------- ---------- ---------- ----------------
SYS SYSTEM 0 1 9 ONLINE
PUBLIC _SYSSMU1$ 1 2 9 ONLINE
PUBLIC _SYSSMU2$ 2 2 25 ONLINE
PUBLIC _SYSSMU3$ 3 2 41 ONLINE
PUBLIC _SYSSMU4$ 4 2 57 ONLINE
PUBLIC _SYSSMU5$ 5 2 73 ONLINE
PUBLIC _SYSSMU6$ 6 2 89 ONLINE
PUBLIC _SYSSMU7$ 7 2 105 ONLINE
PUBLIC _SYSSMU8$ 8 2 121 ONLINE
PUBLIC _SYSSMU9$ 9 2 137 ONLINE
PUBLIC _SYSSMU10$ 10 2 153 ONLINE
11 rows selected.
查詢事務資訊
SQL> select xidusn,xidslot,xidsqn,ubablk,ubafil,ubarec from v$transaction;
XIDUSN XIDSLOT XIDSQN UBABLK UBAFIL UBAREC
---------- ---------- ---------- ---------- - --------- ----------
6 40 427 99 2 7
查詢該活動事務所在的回滾段
SQL> select * from v$rollname where usn = &usn;
Enter value for usn: 6
old 1: select * from v$rollname where usn = &usn
new 1: select * from v$rollname where usn = 6
USN NAME
---------- ------------------------------
6 _SYSSMU6$
查詢 test_delayed 物件所在的 fileid 和 blockid 由於資料物件還存在buffer
SQL> select b.segment_name,a.file#,a.dbarfil,a.dbablk,a.class,
2 a.state,decode(bitand(flag,1), 0, 'N', 'Y') DIRTY
3 from x$bh a,dba_extents b
4 where b.RELATIVE_FNO = a.dbarfil
5 and b.BLOCK_ID <= a.dbablk and b.block_id + b.blocks > a.dbablk
6 and b.owner='GABRIEL' and b.segment_name='TEST_DELAYED';
SEGMENT_NAME FILE# DBARFIL DBABLK CLASS STATE D
-------------------- ---------- ---------- ---------- ---------- ---------- -
TEST_DELAYED 8 8 28 1 1 N
TEST_DELAYED 8 8 28 1 3 N
TEST_DELAYED 8 8 28 1 3 N
TEST_DELAYED 8 8 27 4 1 N
TEST_DELAYED 8 8 27 4 3 N
由上可知:x$bh.class= 4 表示為 segment header x$bh.state =3 為前映象塊,因此file#=8
Dbablk=28 為資料塊
SQL> alter system dump datafile 8 block 28;
System altered.
SQL> alter system dump undo header '_SYSSMU6$';
System altered.
SQL> alter system dump datafile 2 block 99;
System altered.
SQL> @gettrname.sql
TRACE_FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/admin/gabriel/udump/gabriel_ora_4756.trc
以下為 trace 檔案中的截圖部分
Block header dump: 0x0200001c
Object id on Block? Y
seg/obj: 0xcf1a csc: 0x00.f4707 itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x2000019 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0xffff.000.00000000 0x00000000.0000.00 C--- 0 scn 0x0000.000f4707
0x02 0x0006.028.000001ab 0x00800063.0156.07 ---- 2 fsc 0x0004.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
---事務資訊存在
tab 0, row 1, @0x1cf8
tl: 76 fb: --H-FL-- lb: 0x2 cc: 12
col 0: [ 9] 54 45 53 54 5f 52 45 44 4f
col 1: *NULL*
col 2: [ 2] c1 02
col 3: [ 4] c3 06 1d 2d
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 06 17 0d 0c 23
col 6: [ 7] 78 6f 06 17 0d 0c 23
col 7: [19] 32 30 31 31 2d 30 36 2d 32 33 3a 31 32 3a 31 31 3a 33 34
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
tab 0, row 2, @0x1ca9
tl: 79 fb: --H-FL-- lb: 0x2 cc: 12
col 0: [12] 54 45 53 54 5f 44 45 4c 41 59 45 44
col 1: *NULL*
col 2: [ 2] c1 03
col 3: [ 4] c3 06 1f 13
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 08 14 16 02 35
col 6: [ 7] 78 6f 08 14 16 02 35
col 7: [19] 32 30 31 31 2d 30 38 2d 32 30 3a 32 31 3a 30 31 3a 35 32
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
end_of_block_dump
End dump data blocks tsn: 9 file#: 8 minblk 28 maxblk 28
*** 2011-08-20 23:25:38.403
---鎖資訊也存在
再來仔細看看undo segment header 資訊:
TRN TBL::
index state cflags wrap# uel scn dba parent-xid nub stmt_num cmt
------------------------------------------------------------------------------------------------
0x28 10 0x80 0x01ab 0x0002 0x0000.000f59ac 0x00800063 0x0000.000.00000000 0x00000001 0x00000000 0
0x28 轉化為十進位制為 40 剛好為前面查詢的事務槽, state 狀態為10 表示活動事務,dba 0x00800063 轉化為2進位制 0000 0000 1000 0000 0000 0000 0110 0011 根據dba的轉換 2號 檔案的 64+32+2+1 =99
接下來我們看看 undo 段的轉存資訊(限於篇幅, 只擷取了部分關鍵資訊)
Start dump data blocks tsn: 1 file#: 2 minblk 99 maxblk 99
buffer tsn: 1 rdba: 0x00800063 (2/99)
scn: 0x0000.000f59c1 seq: 0x01 flg: 0x04 tail: 0x59c10201
frmt: 0x02 chkval: 0xa7ae type: 0x02=KTU UNDO BLOCK
Hex dump of block: st=0, typ_found=1
…….
UNDO BLK:
xid: 0x0006.028.000001ab seq: 0x156 cnt: 0x7 irb: 0x7 icl: 0x0 flg: 0x0000
Rec Offset Rec Offset Rec Offset Rec Offset Rec Offset
---------------------------------------------------------------------------
0x01 0x1ecc 0x02 0x1e00 0x03 0x1d1c 0x04 0x1c80 0x05 0x1c04
0x06 0x1ad0 0x07 0x19c4
*-----------------------------
* Rec #0x1 slt: 0x06 objn: 49948(0x0000c31c) objd: 49948 tblspc: 2(0x00000002)
* Layer: 11 (Row) opc: 1 rci 0x00
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00800062
*-----------------------------
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
op: C uba: 0x00800062.0156.1e
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x00c05be8 hdba: 0x00c05be3
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 7(0x7) flag: 0x2c lock: 0 ckix: 0
ncol: 12 nnew: 2 size: 0
col 9: [ 1] 80
col 10: [ 1] 80
*-----------------------------
* Rec #0x2 slt: 0x06 objn: 49871(0x0000c2cf) objd: 49871 tblspc: 2(0x00000002)
* Layer: 10 (Index) opc: 22 rci 0x01
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
index undo for leaf key operations
KTB Redo
op: 0x04 ver: 0x01
op: L itl: xid: 0x0003.02a.000001b9 uba: 0x008000d7.0174.23
………..
*-----------------------------
* Rec #0x6 slt: 0x28 objn: 53018(0x0000cf1a) objd: 53018 tblspc: 9(0x00000009)
* Layer: 11 (Row) opc: 1 rci 0x00
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
uba: 0x00800063.0156.04 ctl max scn: 0x0000.000f5354 prv tx scn: 0x0000.000f535c
txn start scn: scn: 0x0000.000f59ac logon user: 64
prev brb: 8388871 prev bcl: 0
KDO undo record:
KTB Redo
op: 0x03 ver: 0x01
op: Z
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0200001c hdba: 0x0200001b
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 183
ncol: 12 nnew: 1 size: 2
col 2: [ 4] c3 06 1d 2d
*-----------------------------
* Rec #0x7 slt: 0x28 objn: 53018(0x0000cf1a) objd: 53018 tblspc: 9(0x00000009)
* Layer: 11 (Row) opc: 1 rci 0x06
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
op: C uba: 0x00800063.0156.06
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0200001c hdba: 0x0200001b
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 0
ncol: 12 nnew: 1 size: 2
col 2: [ 4] c3 06 1f 13
End dump data blocks tsn: 1 file#: 2 minblk 99 maxblk 99
--- irb: 0x7 最近未提交事務的起始 回滾點 ,回滾段資訊偏移量的最後偏移地址 剛好相等
-- rci 0x06 代表undo chain下一偏移量地址
上面dump資訊 是整個事務在沒有commit的情況下產生, 下面我們flush 一下 buffer_cache 將 buffer cache 中的前資料塊寫入dbfile, 然後將事務commit,我們再認真比對dump資訊,
SQL> alter system flush buffer_cache;
System altered.
------在事務窗體進行以下操作:
SQL> show user
USER is "GABRIEL"
SQL> commit;
Commit complete.
重複以上dump操作
…….
SQL> alter system dump datafile 2 block 99;
System altered.
SQL> @gettrname.sql
TRACE_FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/admin/gabriel/udump/gabriel_ora_4963.trc
先看看資料塊的dump資訊
Block header dump: 0x0200001c
Object id on Block? Y
seg/obj: 0xcf1a csc: 0x00.f4707 itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x2000019 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0xffff.000.00000000 0x00000000.0000.00 C--- 0 scn 0x0000.000f4707
0x02 0x0006.028.000001ab 0x00800063.0156.07 ---- 2 fsc 0x0004.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
tab 0, row 1, @0x1cf8
tl: 76 fb: --H-FL-- lb: 0x2 cc: 12
col 0: [ 9] 54 45 53 54 5f 52 45 44 4f
col 1: *NULL*
col 2: [ 2] c1 02
col 3: [ 4] c3 06 1d 2d
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 06 17 0d 0c 23
col 6: [ 7] 78 6f 06 17 0d 0c 23
col 7: [19] 32 30 31 31 2d 30 36 2d 32 33 3a 31 32 3a 31 31 3a 33 34
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
tab 0, row 2, @0x1ca9
tl: 79 fb: --H-FL-- lb: 0x2 cc: 12
col 0: [12] 54 45 53 54 5f 44 45 4c 41 59 45 44
col 1: *NULL*
col 2: [ 2] c1 03
col 3: [ 4] c3 06 1f 13
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 08 14 16 02 35
col 6: [ 7] 78 6f 08 14 16 02 35
col 7: [19] 32 30 31 31 2d 30 38 2d 32 30 3a 32 31 3a 30 31 3a 35 32
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
end_of_block_dump
End dump data blocks tsn: 9 file#: 8 minblk 28 maxblk 28
*** 2011-08-21 00:18:07.820
可以看出資料塊的資訊與 commit 之前的內容基本吻合
再來仔細看看undo segment header 資訊:
0x27 9 0x00 0x01ab 0x0015 0x0000.000f5655 0x00800062 0x0000.000.00000000 0x00000002 0x00000000 1313850640
0x28 9 0x00 0x01ab 0xffff 0x0000.000f6a64 0x00800063 0x0000.000.00000000 0x00000001 0x00000000 1313857062
0x29 9 0x00 0x01aa 0x000a 0x0000.000f54e4 0x00800108 0x0000.000.00000000 0x00000001 0x00000000 1313849990
-----事務已經提交
接下來我們看看 undo 段的轉存資訊(限於篇幅, 只擷取了部分關鍵資訊)
*** 2011-08-21 00:18:20.252
Start dump data blocks tsn: 1 file#: 2 minblk 99 maxblk 99
buffer tsn: 1 rdba: 0x00800063 (2/99)
scn: 0x0000.000f59c1 seq: 0x01 flg: 0x04 tail: 0x59c10201
frmt: 0x02 chkval: 0xa7ae type: 0x02=KTU UNDO BLOCK
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x0D50A600 to 0x0D50C600
UNDO BLK:
xid: 0x0006.028.000001ab seq: 0x156 cnt: 0x7 irb: 0x7 icl: 0x0 flg: 0x0000
Rec Offset Rec Offset Rec Offset Rec Offset Rec Offset
---------------------------------------------------------------------------
0x01 0x1ecc 0x02 0x1e00 0x03 0x1d1c 0x04 0x1c80 0x05 0x1c04
0x06 0x1ad0 0x07 0x19c4
*-----------------------------
* Rec #0x1 slt: 0x06 objn: 49948(0x0000c31c) objd: 49948 tblspc: 2(0x00000002)
* Layer: 11 (Row) opc: 1 rci 0x00
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00800062
*-----------------------------
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
op: C uba: 0x00800062.0156.1e
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x00c05be8 hdba: 0x00c05be3
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 7(0x7) flag: 0x2c lock: 0 ckix: 0
ncol: 12 nnew: 2 size: 0
col 9: [ 1] 80
col 10: [ 1] 80
*-----------------------------
* Rec #0x2 slt: 0x06 objn: 49871(0x0000c2cf) objd: 49871 tblspc: 2(0x00000002)
* Layer: 10 (Index) opc: 22 rci 0x01
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
index undo for leaf key operations
KTB Redo
op: 0x04 ver: 0x01
op: L itl: xid: 0x0003.02a.000001b9 uba: 0x008000d7.0174.23
flg: C--- lkc: 0 scn: 0x0000.000f5659
Dump kdilk : itl=2, kdxlkflg=0xc1 sdc=0 indexid=0xc059ab block=0x00c059b0
*-----------------------------
* Rec #0x6 slt: 0x28 objn: 53018(0x0000cf1a) objd: 53018 tblspc: 9(0x00000009)
* Layer: 11 (Row) opc: 1 rci 0x00
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
uba: 0x00800063.0156.04 ctl max scn: 0x0000.000f5354 prv tx scn: 0x0000.000f535c
txn start scn: scn: 0x0000.000f59ac logon user: 64
prev brb: 8388871 prev bcl: 0
KDO undo record:
KTB Redo
op: 0x03 ver: 0x01
op: Z
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0200001c hdba: 0x0200001b
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 183
ncol: 12 nnew: 1 size: 2
col 2: [ 4] c3 06 1d 2d
*-----------------------------
* Rec #0x7 slt: 0x28 objn: 53018(0x0000cf1a) objd: 53018 tblspc: 9(0x00000009)
* Layer: 11 (Row) opc: 1 rci 0x06
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
op: C uba: 0x00800063.0156.06
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0200001c hdba: 0x0200001b
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 0
ncol: 12 nnew: 1 size: 2
col 2: [ 4] c3 06 1f 13
由兩次的dump 對比可以得出: 塊延遲清除只是更改了 undo segment header 的事務資訊狀態, 資料塊 與 undo 塊資訊均保持不變
--
SQL> set echo off
SQL> set autotrace on
SQL> select * from gabriel.test_delayed; ---將資料塊再次快取在 cache buffer
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
178 recursive calls
0 db block gets
27 consistent gets
7 physical reads
72 redo size
1364 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
4 sorts (memory)
0 sorts (disk)
3 rows processed
再次轉存 資料塊資訊
SQL> alter system dump datafile 8 block 28;
System altered.
SQL> @gettrname.sql
TRACE_FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/admin/gabriel/udump/gabriel_ora_5017.trc
再次觀察資料塊的dump資訊
*** 2011-08-21 00:50:23.744
*** SERVICE NAME:(SYS$USERS) 2011-08-21 00:50:23.743
*** SESSION ID:(152.73) 2011-08-21 00:50:23.743
Start dump data blocks tsn: 9 file#: 8 minblk 28 maxblk 28
buffer tsn: 9 rdba: 0x0200001c (8/28)
Block header dump: 0x0200001c
Object id on Block? Y
seg/obj: 0xcf1a csc: 0x00.f6e54 itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x2000019 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0xffff.000.00000000 0x00000000.0000.00 C--- 0 scn 0x0000.000f4707
0x02 0x0006.028.000001ab 0x00800063.0156.07 C--- 0 scn 0x0000.000f6a64
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
---事務資訊清除
block_row_dump:
tab 0, row 0, @0x1f1d
tl: 99 fb: --H-FL-- lb: 0x0 cc: 12
col 0: [30]
42 49 4e 24 70 6c 6f 37 43 4f 51 50 35 34 54 67 51 4b 6a 41 62 67 41 4d 4a
51 3d 3d 24 30
col 1: *NULL*
col 2: [ 4] c3 06 1d 19
col 3: [ 4] c3 06 1d 19
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 04 1a 05 1c 21
col 6: [ 7] 78 6f 06 17 0d 08 3c
col 7: [19] 32 30 31 31 2d 30 36 2d 32 33 3a 31 32 3a 30 37 3a 35 39
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
tab 0, row 1, @0x1cf8
tl: 76 fb: --H-FL-- lb: 0x0 cc: 12
col 0: [ 9] 54 45 53 54 5f 52 45 44 4f
col 1: *NULL*
col 2: [ 2] c1 02
col 3: [ 4] c3 06 1d 2d
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 06 17 0d 0c 23
col 6: [ 7] 78 6f 06 17 0d 0c 23
col 7: [19] 32 30 31 31 2d 30 36 2d 32 33 3a 31 32 3a 31 31 3a 33 34
col 8: [ 5] 56 41 4c 49 44
col 9: [ 1] 4e
col 10: [ 1] 4e
col 11: [ 1] 4e
tab 0, row 2, @0x1ca9
tl: 79 fb: --H-FL-- lb: 0x0 cc: 12
col 0: [12] 54 45 53 54 5f 44 45 4c 41 59 45 44
col 1: *NULL*
col 2: [ 2] c1 03
col 3: [ 4] c3 06 1f 13
col 4: [ 5] 54 41 42 4c 45
col 5: [ 7] 78 6f 08 14 16 02 35
col 6: [ 7] 78 6f 08 14 16 02 35
---鎖資訊已經清除
總結整個block delaye cleanout 過程
(1) 本次事務相關的資料塊已經被刷出了 buffer cache, 當本次事務提交後,事務相關的data block ,undo block 上的事務資訊,鎖資訊不會被清除。
(2) 當data block 再次進入buffer cache, oracle在讀取次資料塊時 作 事務資訊 鎖資訊的清除處理
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8117479/viewspace-705530/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Block Cleanouts 塊清除OracleBloC
- [20180626]延遲塊清除與只讀表.txt
- 塊清除(block clean out)BloC
- Delayed Message 外掛實現 RabbitMQ 延遲佇列MQ佇列
- [20150409]只讀表空間與延遲塊清除.txt
- [20190124]bbed恢復資料遇到延遲塊清除的問題.txt
- 29、undo_2_1(事務槽、延遲塊清除、構造CR塊、ora-01555)
- [20190125]bbed恢復資料遇到延遲塊清除的問題3.txt
- [20190124]bbed恢復資料遇到延遲塊清除的問題2.txt
- 【BLOCK】Oracle 塊管理常用SQLBloCOracleSQL
- ORACLE密碼錯誤驗證延遲Oracle密碼
- 【BLOCK】Oracle壞塊處理命令參考BloCOracle
- Oracle資料庫密碼延遲驗證Oracle資料庫密碼
- 深入理解JVM(③)低延遲的Shenandoah收集器JVMNaN
- RabbitMQ延遲訊息的延遲極限是多少?MQ
- 延遲繫結
- 延遲塊清理介紹(select也會產生redo的原因)
- redis 延遲佇列Redis佇列
- Mybatis延遲查詢MyBatis
- WebGL之延遲著色Web
- Laravel 延遲佇列Laravel佇列
- 疫情延遲 題解
- 實現簡單延遲佇列和分散式延遲佇列佇列分散式
- 基於rabbitmq延遲外掛實現分散式延遲任務MQ分散式
- Oracle 11g 密碼延遲認證與 library cache lock 等待Oracle密碼
- 理解 Ruby 裡的 blockBloC
- 理解 Block 實現原理BloC
- 延遲阻塞佇列 DelayQueue佇列
- 延遲繫結與retdlresolve
- 從庫延遲案例分析
- hyperf redis延遲佇列Redis佇列
- 一張圖帶你理解和實現RabbitMQ的延遲佇列功能MQ佇列
- 美國伺服器延遲高怎麼辦,如何解決延遲問題伺服器
- mysql主從延遲複製MySql
- 延遲靜態繫結——static
- 前向渲染和延遲渲染
- Flink 鏈路延遲測量
- 主從延遲調優思路
- PostgreSQL中的複製延遲SQL