Fw: Snapshot too old from READ-ONLY table (data pump export)

From: <Laimutis.Nedzinskas_at_seb.lt>
Date: Tue, 19 Jul 2011 14:19:07 +0300
Message-ID: <OFDAA956C7.0B524D76-ONC22578D2.003D7E54-C22578D2.003E2EAA_at_seb.lt>


p.s. Ive put everything into blog post

http://laimisnd.wordpress.com/2011/07/19/reverse-engineering-consistent-reads-multi-versioning-itl-ora-1555-row-level-locks-concurency/

Currently, the data structure seesm to be quite complete.

What lacks is a better understanding how oracle reconstructs consistent block image.
I believe Jonathan Lewis nailed the point:

"When all the ITL entries show SCNs no later than your query SCN the clone is read-consistent and the data can be used by the query."

Again, one may ask - why all this is important? Ok, it's quite a difference in CPU and disk IO and storage(undo including, hence ora-1555 ) if one ITL or ALL ITL's have to be processed, right ?

Then more ITL's decrease ITL contention but potentially (if many concurrent txn's) increase CPU/IO (?)

Then one may wonder if extreme case one block-one row may be good under certain circumstances ?

Brgds, Laimis N


Please consider the environment before printing this e-mail ----- Forwarded by Laimutis Nedzinskas/VBankas on 2011.07.19 14:11 -----

                                                                                                                                                   
  From:       Laimutis Nedzinskas/VBankas                                                                                                          
                                                                                                                                                   
  To:         oracle-l_at_freelists.org                                                                                                               
                                                                                                                                                   
  Date:       2011.07.19 14:05                                                                                                                     
                                                                                                                                                   
  Subject:    Re: Fwd: Snapshot too old from READ-ONLY table (data pump export)                                                                    
                                                                                                                                                   




>http://arup.blogspot.com/2011/01/more-on-interested-transaction-lists.html

Exactly.
But I had to add this to

http://avdeo.com/2008/06/16/interested-transaction-list-itl/

to

https://richardfoote.wordpress.com/2010/07/20/index-block-dump-block-header-part-i-editions-of-you/

and

https://richardfoote.wordpress.com/2010/07/28/index-block-dump-block-header-part-ii-and-read-consistency-i-cant-read/

to Jonatahn Lewis comments at:.

http://forums.oracle.com/forums/thread.jspa?messageID=3725660

Jonathan is probably the first in the above mentioned links to talk about COMMIT scn not just CHANGE scn - who cares about change SCN anyway ? But he makes one interesting statement:

"When all the ITL entries show SCNs no later than your query SCN the clone is read-consistent and the data can be used by the query."

I'd like to know what was ment by that. My interpretation is:

one can reconstruct a consistent read of a particular row at query start SCN. Or one can reconstruct a consistent read of the whole block at query start SCN.

As oracle operates "in blocks" then I assume this is how oracle reconstructs the consistent read of a block: ALL ITL's have to be delt with to have every row in a block rollbacked to commit SCN just before query start SCN.

and finally

http://forums.oracle.com/forums/thread.jspa?threadID=521913

Mark J Bobak tells what is really needed to complete the picture:

"Then, at the row level, in the row directory, there's a lock byte. The value of the lock byte will be either 0, if there is no lock on the row, or it will be the number of the slot in the ITL that corresponds to the transaction that's making a change, or just holding a lock, on that particular row. So, the locked row in the block points to the ITL slot, and the ITL slot points back at the undo segment/slot/sequence. "

Here, IMHO, the structure is complete:

Row Lock byte points to ITL, ITL points to transaction commit SCN and undo record.

Then everything adds up: row level locking, transaction isolation, all ITL's traversal.

The block oriented nature of oracle is explained by Tom Kyte:

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:27330770500351 "o we cache blocks
o we read blocks
o blocks have transaction tables on them, this is what drives the multi-versioning

relational databases tend to do things "to blocks", it is basically the way they work.

We do not multi-version ROWS.
We multi-version BLOCKS.
"

Quite a list to have somehow complete picture :) , isn't it ?

Brgds, Laimis N


Please consider the environment before printing this e-mail

                                                                                                                                                   
  From:       Ron Chennells <ron.chennells_at_parkwestit.com>                                                                                         
                                                                                                                                                   
  To:         oracle-l_at_freelists.org                                                                                                               
                                                                                                                                                   
  Date:       2011.07.19 11:58                                                                                                                     
                                                                                                                                                   
  Subject:    Re: Fwd: Snapshot too old from READ-ONLY table (data pump export)                                                                    
                                                                                                                                                   





Some details here

http://arup.blogspot.com/2011/01/more-on-interested-transaction-lists.html

Ron

Quoting Laimutis.Nedzinskas_at_seb.lt:

> Since the question was raised again, does anyone know the latest,
> up-do-date explanation on how oracle multi versioning works.
>
> ITL's, commit SCN's, row lock byte all put together and explained :)
>
> The problem is that many very clever people reverse engineered one or
> another aspect of the process but one can hardly find an all-out
> explanation.
> I dare to claim that some statements one finds on internet made by even
> experienced oracle gurus are doubtful to say the least.
> Actually, oracle's own metalink is known to provide hmmm.. strange
> statements. That happens.
> The whole multi versioning is easy to explain at a high level but
> implementation is quite tricky.
>
> Why is implementation that important? Because knowing how it works one
can
> answer some questions right away how fast oracle can perform in
particular
> situations.
> It's less of a black box approach and more of algorithm analysis then.
>
>
> Thank you in advance,
> Laimis N
>
> --
> http://www.freelists.org/webpage/oracle-l:
>
>
>
>

  http://www.linkedin.com/in/ronchennells

--
http://www.freelists.org/webpage/oracle-l:






--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jul 19 2011 - 06:19:07 CDT

Original text of this message