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: frequent commits

Re: frequent commits

From: Daniel Fink <danielwfink_at_yahoo.com>
Date: 16 Jan 2006 08:41:36 -0800
Message-ID: <1137429696.368887.222650@z14g2000cwz.googlegroups.com>


First, let's make a basic definition of transaction information (TX INFO). For the purposes of this response, I am talking about undo
(actual undo entries as well as the transaction table information in
the undo segment header) and block (interested transaction entries that provide a path to undo) entries.

Second, a commit does not wipe out TX INFO. When a transaction commits, the TX INFO is updated to indicate the committed state and the commit scn. That information is retained until the structures are needed by another transaction, and even then, the other transaction keeps some pointers to the previous TX INFO.

Here is a simple description of the read consistent process. QueryA
(Qa) starts at Time100 (t100) and starts to read data. It comes across
TX INFO from Transaction D (Td) that was committed at Time1000 (t1000). Qa reconstructs the data block by undoing the effects of Td. When this process is completed, it finds TX INFO from Transaction C (Tc) that was committed at Time 500 (t500). As t500 > t100, Qa must continue the process of undoing changes. It must have an image of the block that does not contain changes committed by another transaction after t100. The TX INFO of Transaction B (Tb) is present and indicates that it was committed at Time 101 (t101).

At this point, 1 of 2 things happens

  1. Qa is able to follow the TX INFO of Tb and undo it's changes. This leaves the block in a consistent (no uncommitted changes) state before Qa began; or
  2. Qa follows the TX INFO of Tb and finds that some of the info is missing (let's say an undo entry has been overwritten). At this point, an ORA-01555 is returned to the query.

It is important to note that there is not a time limit on either 1 or 2. On a system where there is a high amount of data modification, TX INFO from a committed transaction can be overwritten within a very short amount of time. On a system where there is little data modification, TX INFO might still exist a year after the transaction.

This is the basic process regardless if you are using automatic or manual undo.

Regards,
Daniel Fink Received on Mon Jan 16 2006 - 10:41:36 CST

Original text of this message

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