Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: redo log "entry" = redo log "block" ?

Re: redo log "entry" = redo log "block" ?

From: Howard J. Rogers <>
Date: Fri, 30 Apr 2004 23:04:06 +1000
Message-ID: <40924ebe$0$4543$>

Spendius wrote:

> When they talk about "redo log entries" in the doc. is
> it a synonym of "redo block" or is it a different structure ?
> Thanks.
> Sp

A redo log entry is (I think -it's difficult to advise without seeing the actual quote and putting it into context) just the data that is generated whenever you perform some DML -namely, the before and after-images of the column data, plus associated overhead.

If you update someone's salary from 600 to 700, for example, the before image is the rowid, come column identification, plus the number 600. The after image is the same stuff, plus the number 700. (Actually, there's a lot more to a redo entry than that, but that's the general idea. Have a desc of v$logmnr_contents to get an idea for how much "overhead" is actually associated with the stuff that's actually yours!).

If you insert, the before image is essentially just the rowid, but the after image is the entire row. And the reverse is the case for a delete.

They're the entries, anyway. And they are made in the first place in the redo log buffer, in memory. Eventually they get flushed to one or other of your online redo logs (at a commit, before DBWR flushes, when the log buffer is 1/3rd full, or when 1MB of uncommitted redo is generated).

Redo logs (the physical files) are not internally formatted to have Oracle blocks like a data file is. Therefore, they essentially are just made up of file system blocks, and a log block is just another name for a file system block.

And just as a peanut-sized text file written in notepad nevertheless has to be stored in a complete file system block (or cluster), with attendant issues of 'slack space' on your hard disk, so LGWR has to fill a complete file system/redo log block even if the amount of redo being flushed is tiny. Generally, file systems use 512 byte blocks, so the smallest update will have to occupy 512 bytes of redo log space.

That's broadly speaking it, anyway. As far as I can tell, when "they" talk about log entries, they're talking about the actual data, which sure enough eventually ends up being stored inside a redo log block (a.k.a. file system or even operating system block).

HJR Received on Fri Apr 30 2004 - 08:04:06 CDT

Original text of this message