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: Concepts question about Redo Log Files

Re: Concepts question about Redo Log Files

From: Allen Kirby <akirby_at_att.com>
Date: 1997/01/06
Message-ID: <32D10320.6634@att.com>#1/1

Paul wrote:
>
> Could someone please explain to me the reason we must have redo log
> files? That is, why can't we just write committed transactions directly
> to the data files?
>
> I understand the importance of multiplexing the redo log files for
> backup and recovery issues. I also can see how a small, sequential redo
> log file might be written to by Oracle, slightly faster than the actual
> data file. But I just don't see why, in theory, we couldn't do away
> with the redo log files. Someone please help explain this to me as I
> will not be able to sleep until I fully understand WHY!!!!!!
>
> Paul

Paul,

	The answers are throughput and recovery.  There is a huge
	difference between sequentially writing to one redo log file
	and writing randomly to numerous data files.  You would have
	to write the changes to the data file(s) and get confirmation
	back before you could complete the commit and that could take
	a while on a large transaction.

	But the biggest reason is probably recovery.  If you had no
	redo logs and the database crashed (although I'm sure no one
	here has ever had the db crash, right???) you now have a 
	corrupted database, since there is no way to roll back a 
	partially committed transaction.  The redo logs also contain
	before images as well as after images.  During recovery, all
	after images are reapplied to the data files first, then the
	uncommitted transactions are rolled back using the before
	images which are actually after images of the rollback segments
	(totally confusing, I know, but think about it).  I'm sure
	there are other reasons as well.

	Hope you can sleep now!  
-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Mon Jan 06 1997 - 00:00:00 CST

Original text of this message

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