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

Home -> Community -> Usenet -> c.d.o.server -> Re: LGWR writing junk data?

Re: LGWR writing junk data?

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sat, 27 Mar 2004 15:18:37 +1100
Message-ID: <406500b0$0$31904$afc38c87@news.optusnet.com.au>

"Tom Barnes" <nospam1978_at_yahoo.com> wrote in message news:5af28966.0403261941.42bd7d29_at_posting.google.com...
> I've learned that LGWR writes data from the log buffer to disk at
> least:
>
> * Every 3 seconds
> * When 1/3 or 1Mb full
> * When we commit
>
> Someone told me today that when LGWR writes data to disk it writes the
> whole content of the log buffer regardless of how much data was
> actually changed (much of what gets written is junk data). So for
> example, if you do one insert and then a commit LGWR would write data
> the size of the log buffer to disk. Is this really correct?

No it's not correct. Where I think the misunderstanding may have arisen is that LGWR always writes complete log *blocks* (invariably the same size as your O/S block, nothing to do with db_block_size, and usually 512 bytes in size.). It's what the O/S does too: save a 300 byte file, and 512 bytes of disk space is used to accomodate it. In the same way, generate a piffling 200 bytes of redo, and then commit, and LGWR must nevertheless use an entire Log Block to store it in. That doesn't mean it generates 312 bytes of rubbish to pad it out, merely that there is 'slack space' within the log block.

>I would
> think that whats gets written to disk is only whatever redo had
> actually been generated.

Well, more precisely, it writes to disk anything which has been generated and which has not already been written to disk, but yes: Whoever told you what they told you needs to get a few things sorted out in their heads, I suspect.

Regards
HJR Received on Fri Mar 26 2004 - 22:18:37 CST

Original text of this message

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