Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: delayed block cleanout (?) for active tx

RE: delayed block cleanout (?) for active tx

From: Shamsudeen, Riyaj <RS2273_at_att.com>
Date: Thu, 21 Jun 2007 17:36:59 -0500
Message-ID: <6A4102F59ECFA248B81F7D08F03179780126E598@TBDCEXCH01.US.Cingular.Net>


>> In order to build a CR copy of the current block, Oracle has

>> to copy the current version to a new buffer, and then apply

>> the undo records to it. But the CR copy doesn't need to

>> be protected by redo - so the redo has to be generated

>> to protect some changes to the current buffer, not the changes

>> to the new buffer that holds the CR copy.
 

Okay, I said previously undo records are applied, that was incorrect, but still changes are applied to cloned block. Block cleanouts are performed to the cloned block, generating redo.  

To create a CR copy : Block cleanouts are performed to the "cloned" block and that's generating redo. Cloned block is not permanent and so current mode block does not have these cleanouts. If you rerun the query, block clean outs are performed to the cloned block, generating redo again.  

Redo size was 76492 from v$sesstat for that session [ queried from a different session ]. Dumping the logfile, there were 1471 redo records and each of size 52 bytes. So, total redo size for block cleanout was 52*1471=76492, matching with v$sesstat. Sample redo records:  

REDO RECORD - Thread:2 RBA: 0x0001fc.00000080.0148 LEN: 0x0034 VLD: 0x01

SCN: 0x0862.5d99195e SUBSCN: 1 06/21/2007 17:47:47

CHANGE #1 TYP:0 CLS: 1 AFN:21 DBA:0x054d139a SCN:0x0862.5d829511 SEQ: 17 OP:4.1

Block cleanout record, scn: 0x0862.5d99195e ver: 0x01 opt: 0x01, entries follow...  

REDO RECORD - Thread:2 RBA: 0x0001fc.00000080.017c LEN: 0x0034 VLD: 0x01

SCN: 0x0862.5d99195f SUBSCN: 1 06/21/2007 17:47:47

CHANGE #1 TYP:0 CLS: 1 AFN:21 DBA:0x054d139b SCN:0x0862.5d829514 SEQ: 1 OP:4.1

Block cleanout record, scn: 0x0862.5d99195f ver: 0x01 opt: 0x01, entries follow...  

Rerunning the query three times generated 1471*3=4413 block cleanout records. See below same block is cleaned out three times with different SCN three times.  

CHANGE #1 TYP:0 CLS: 1 AFN:21 DBA:0x054d13f3 SCN:0x0862.5daccba9 SEQ: 1 OP:4.1

Block cleanout record, scn: 0x0862.5dacec1e ver: 0x01 opt: 0x01, entries follow...

...

CHANGE #1 TYP:0 CLS: 1 AFN:21 DBA:0x054d13f3 SCN:0x0862.5dacec1e SEQ: 1 OP:4.1

Block cleanout record, scn: 0x0862.5dacf2bc ver: 0x01 opt: 0x01, entries follow...

...

CHANGE #1 TYP:0 CLS: 1 AFN:21 DBA:0x054d13f3 SCN:0x0862.5dacf2bc SEQ: 1 OP:4.1

Block cleanout record, scn: 0x0862.5dacf8d9 ver: 0x01 opt: 0x01, entries follow...  

Thanks

Riyaj  

-----Original Message-----
From: Alberto Dell'Era [mailto:alberto.dellera_at_gmail.com] Sent: Thursday, June 21, 2007 4:39 PM
To: Shamsudeen, Riyaj
Cc: Oracle-L
Subject: Re: delayed block cleanout (?) for active tx  

Riyaj,  

may you please check my reasonings below ?

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 21 2007 - 17:36:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US