Re: ISOLATION LEVEL

  • From: "Niall Litchfield" <niall.litchfield@xxxxxxxxx>
  • To: oracle.tutorials@xxxxxxxxx
  • Date: Tue, 10 Jul 2007 11:58:04 +0100

Where does your requirement/code come from. Is your code not a logical
transaction? If so why do you need to see wrong/old data at later stages. If
it is a logical transaction then make it a single transaction and you'll
only see consistent data.

Something doesn't sound quite right but without seeing either your code or
your requirements it's somewhat tricky to tell.



On 7/10/07, DBA Deepak <oracle.tutorials@xxxxxxxxx> wrote:

Hi All,

Have a doubt on transaction isolation.

My requirement is to query several tables several times inside a piece of
code. The data needs to be consistent across multiple queries. The
underlying tables are subjected to change during the execution of the piece
of code.

I have two options to be used inside my piece of code to achieve
consistent/repeatable reads.

1> to use SET TRANSACTION READ ONLY;
2> to use ALTER SESSION SET ISOLATION_LEVEL=SERIALIZABLE;

My question is which option is preferable and why? Is there any
performance issues with one of these in the above mentioned scenarios?

Need your valuable feedback.

--
Regards,

Deepak
Oracle DBA




--
Niall Litchfield
Oracle DBA
http://www.orawin.info

Other related posts: