Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle-l »

ISOLATION LEVEL

DBA Deepak

2007-07-10

Replies:

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
©2008 dba.5341.com - Jax Systems, LLC, U.S.A.