ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 块延迟清除(delayed block cleanout) 理解

oracle 块延迟清除(delayed block cleanout) 理解

原创 Linux操作系统 作者:wangxiangtao 时间:2011-08-22 12:20:49 0 删除 编辑

 

为了保证事务的回退和满足多用户的CR oracle引入了undo 机制, 由于undo是循环使用的,在一个事务完成过程中,它与redo相互配合,其中undo在一次事务中需要完成以下工作:

(1)     Transaction 开始前 回滚段获取一个ITL(事务槽),分配空间, 记录事务信息

(2)     Transaction 提交后,redo完成记录,同时还清除回滚段的事务信息 包括行级锁,ITL信息(commit 标志,SCN)

清除这些事务段的信息的过程就叫做 块清除, 在完成块清除时, 我们本事务修改的数据块就会存在两种可能(1) 所有的数据块还保存在 buffer  cache 中, (2)部分数据块或者是全部数据块由于LRU管理已经被刷出了buffer cacheoracle为了考虑到块清除的成本,以及性能,会作以下两种方式的块清除处理:

(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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-08-18

  • 博文量
    26
  • 访问量
    97308