dbTalk Databases Forums  

Flashback log file sync

comp.databases.oracle.server comp.databases.oracle.server


Discuss Flashback log file sync in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Jonathan Lewis
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 01:49 AM






"Mladen Gogala" <gogala.mladen (AT) gmail (DOT) com> wrote

Quote:
On Sat, 12 May 2012 19:49:36 +0100, Jonathan Lewis wrote:


The plot thickens. I re-created the LOB as cache and flashback waits went
away:

EVENT TIME_WAITED AVERAGE_WAIT
------------------------------ ----------- ------------
Disk file operations I/O 0 .02
log buffer space 0 0
log file sync 1 .77
SQL*Net message to client 1 0
log file switch completion 23 5.77
SQL*Net message from client 523 1.02
SQL*Net more data from client 1323 .01
db file sequential read 33915 .14

I'm not entirely surprised. The algorithm for when a block should be
written to the flashback log relates to when it was last changed, when it
last went into the flashback, and when it was last written. If your LOBs
are direct path reads and writes all the time it's possible that the
default action is to write the block into the flashback log because the
information that is needed to minimise flashback logging doesn't get
created on direct path actions.

When you can get LOBs over-written, though (i.e. LOB space re-used rather
than constantly "newing" previously unused block), I think you may start to
see flashback log writes re-appearing

Sorry about the empty previous post - finger trouble.

--
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

Reply With Quote
  #12  
Old   
Jonathan Lewis
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 01:54 AM






"Mladen Gogala" <gogala.mladen (AT) gmail (DOT) com> wrote

Quote:
Flashback logs, just like their redo counterparts, record change vectors,
in order to be able to reconstruct the data, up to specific point in
time. The default is 24 hours, controlled by the
"db_flashback_retention_target" parameter.

Flashback logs hold entire Oracle blocks (think Oracle 5 and the BI file).

However they don't (normally) hold a copy of every version of the block
that has every existed; you should get something like one copy per
flashback log file to cover all the changes that have happened to a block
since it was most recently loaded into the buffer cache (compare redo
logging full blocks when tablespaces are in backup mode)


--
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

> If the block being changed is in SGA, th

Reply With Quote
  #13  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 02:43 AM



On Sun, 13 May 2012 07:54:15 +0100, Jonathan Lewis wrote:


Quote:
Flashback logs hold entire Oracle blocks (think Oracle 5 and the BI
file).
Wow! Not that I don't believe you, but that is really wild. I'll try
checking it by doing a hex dump of some .fb files and confirm this.



--
http://mgogala.byethost5.com

Reply With Quote
  #14  
Old   
Jonathan Lewis
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 03:56 AM



"Mladen Gogala" <gogala.mladen (AT) gmail (DOT) com> wrote

Quote:
On Sun, 13 May 2012 07:54:15 +0100, Jonathan Lewis wrote:

Flashback logs hold entire Oracle blocks (think Oracle 5 and the BI
file).

Wow! Not that I don't believe you, but that is really wild. I'll try
checking it by doing a hex dump of some .fb files and confirm this.

I wouldn't want you to do otherwise.

--
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

Reply With Quote
  #15  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 10:40 PM



On Sun, 13 May 2012 09:56:11 +0100, Jonathan Lewis wrote:

Quote:
| Wow! Not that I don't believe you, but that is really wild. I'll try |
checking it by doing a hex dump of some .fb files and confirm this. |

I wouldn't want you to do otherwise.
And you are right. Current record: block image. I still don't understand
why did they do it like that.

Trace file /oracle/diag/rdbms/o11/O11/trace/O11_ora_2567.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options
ORACLE_HOME = /oracle/product/11.2.0/11.2.0.3
System name: Linux
Node name: medo.home.com
Release: 3.3.5-2.fc16.x86_64
Version: #1 SMP Tue May 8 11:24:50 UTC 2012
Machine: x86_64
Instance name: O11
Redo thread mounted by this instance: 1
Oracle process number: 28
Unix process pid: 2567, image: oracle (AT) medo (DOT) home.com


*** 2012-05-13 23:33:46.282
*** SESSION ID11.17) 2012-05-13 23:33:46.282
*** CLIENT ID) 2012-05-13 23:33:46.282
*** SERVICE NAMEO11.home.com) 2012-05-13 23:33:46.282
*** MODULE NAMEsqlplus (AT) medo (DOT) home.com (TNS V1-V3)) 2012-05-13
23:33:46.282
*** ACTION NAME) 2012-05-13 23:33:46.282

DUMP OF FLASHBACK LOG FILE (15) /data/oracle/flashback/O11/flashback/
o1_mf_7txdxqkn_.flb
FILE HEADER:
Compatibility Vsn = 186646528=0xb200000
Db ID=1818577220=0x6c654944, Db Name='O11'
Activation ID=1818575684=0x6c654344
Control Seq=3492=0xda4, File size=65536=0x10000
File Number=15, Blksiz=8192, File Type=8 FLASH BACK
FLASHBACK HEADER:
Flashback Block Header:
Seq: 16 Block: 1 Cks: 0xc586 Flag: 0x1 Lst: 0
description:"Thread 0001, Seq# 0000000016, SCN 0x0000001bbfaf"
thread: 1 seq: 16 version 0 nab: 65537
reset logs count: 0x2e883e0a scn: 0x0000.000f30dc
formatted blocks: 65536 usable blocks: 65536
magic: 4 previous magic: 0 flags: 0x0
Low scn: 0x0000.001bbfaf 05/12/2012 15:05:06
High scn: 0x0000.001bc39c 05/12/2012 15:13:17
Last Marker:
fba: (lno 0 thr 0 seq 0 bno 0 bof 0)
Flashback async buffers are set to 32

*** 2012-05-13 23:33:52.815
Current records:
**** Record at fba: (lno 15 thr 1 seq 16 bno 65536 bof 4852) ****
RECORD HEADER:
Type: 1 (Block Image) Size: 28
RECORD DATA (Block Image):
file#: 7 rdba: 0x01c08cf8
Next scn: 0x0000.001bc39c [0.1819548]
Flag: 0x1
Block Size: 8192
BLOCK IMAGE:
buffer rdba: 0x01c08cf8
scn: 0x0000.001bbca2 seq: 0x02 flg: 0x04 tail: 0xbca22802
frmt: 0x02 chkval: 0x285c type: 0x28=PAGETABLE MANAGED LOB BLOCK
Hex dump of block: st=0, typ_found=1




--
http://mgogala.byethost5.com

Reply With Quote
  #16  
Old   
Jonathan Lewis
 
Posts: n/a

Default Re: Flashback log file sync - 05-13-2012 , 11:49 PM



"Mladen Gogala" <gogala.mladen (AT) gmail (DOT) com> wrote

Quote:
On Sun, 13 May 2012 09:56:11 +0100, Jonathan Lewis wrote:

| Wow! Not that I don't believe you, but that is really wild. I'll try

checking it by doing a hex dump of some .fb files and confirm this. |

I wouldn't want you to do otherwise.

And you are right. Current record: block image. I still don't understand
why did they do it like that.

Oracle Core: pages 155-156

--
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.