about redologs
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: about redologs

  1. #1
    Join Date
    May 2001
    Posts
    736

    about redologs

    Hello friends

    When iam going browsing some documentation i came across this paragraph.
    By writting the change vectors and the SCN to the redo log files oracle ensures that the commiited changes are never lost.This process is known as the fast commit.

    "Writes to redo logs files are faster than writing the blocks to data files".

    can u explain the quoted sentence how exactly it happens.
    regards
    akhadar

  2. #2
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    When a user issues a COMMIT statement, LGWR puts a commit record in the redo log buffer and writes it to disk immediately, along with the transactions redo entries. The corresponding changes to data blocks are deffered until it is more efficient to write them. This is called a fast commit mechanism.

    I guess that sentence just mean writing dirty buffer at Checkpoint is more efficient than writing dirty buffer at every commit, and the write of redo entry is the single event that determins the transactions has committed.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  3. #3
    Join Date
    May 2001
    Posts
    736
    I understood the basic concept of fast commit.What i want to ask is
    how exactly "Writes to redo logs files are faster than writing the blocks to data files".

  4. #4
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    I guess that sentence is wrong if you try to understand it directly. It just simply tell us the advantages of FAST COMMIT on the aspect of performance. Try to understand it from a different point of view.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  5. #5
    Join Date
    May 2001
    Posts
    736
    Done.Since the DBW process writes the changed blocks to the data file independent of any commit.All the way i was seperating the particular sentence seperately it is leading me some where else.But any how thank u.
    regards
    akhadar

  6. #6
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Writes to redo logs compared to writes to database files are much faster for two main reaons:

    - Writes to redo logs are performed in "serial fashion", meaning that LGWR simply writes changes at the end of the redolog stream, ie where he ended previous write. So the physical location of where to perform writes is very fast, and once the writing starts it simply writes continuously, without the need to reposition disk heads. On the other hand, writes to database files are scattered all over the disk(s), as it must write each buffer to its very exactly specified disk location.

    - The changes written to redo logs are much smaller in terms of written bytes, because only what actualy changed is written to the redo logs (changed vectors), while writes to datafiles are allways performed as full database block writes. For example, if you change one single byte in a record, onle very small amount of information (few bytes) will be written to the redo log file, while DBWR will need to write 16K of information to the database file (if your block size is 16K) as a result of the same change.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  7. #7
    Join Date
    May 2001
    Posts
    736
    very good explanation jurij this is exactly what i want to know
    thank u

  8. #8
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    Thank you. It is definitely an excellent explanation. Make me clear about that.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width