ISOLATION LEVEL

  • From: "DBA Deepak" <oracle.tutorials@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 10 Jul 2007 14:39:28 +0530

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

Other related posts: