Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle Isolation Level Tips

Oracle Database Tips by Donald BurlesonConsulting

April 25, 2015

With robust, complex database systems, there has to be a way of managing potential conflicts that could arise when attempting to process multiple transactions on a database at the same time.  In Oracle, users can specify transaction isolation levels to indicate the level of care to be exercised when resolving potential conflicts. 

The higher the transaction isolation level is, the more careful the system is about avoiding conflicts.  On the other hand, there generally is a price for this avoidance of conflict.  The higher the transaction isolation level, the locking overhead can increase while user concurrency can decrease.  Developers and DBA must take these factors into account when setting Oracle transaction isolation levels.

Currently, there are three transaction isolation levels supported by the Oracle database.  There is a fourth transition isolation level, read uncommitted, that is not supported by Oracle.

 These transaction isolation levels are:

  • Read Committed
  • Serializable
  • Read Only

Read Committed Transaction Isolation Level

The read committed transaction isolation level is the Oracle default.  With this setting, each query can see only data committed before the query, not the transaction, began.  Oracle queries do not read dirty, or uncommitted, data; however, it does not prevent other transaction from modifying data read by a query.  Thus, it is possible that other transactions can change data between executions of the query.  Any transaction that executes a given query more than once can experience non-repeatable reads or phantoms.

If necessary, the read committed transaction isolation level can be set using the following:

  • Transaction Level:

    SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
  • Session Level:

    ALTER SESSION SET ISOLATION_LEVEL READ COMMITTED;   

Serializable Transaction Isolation Level

The serializable transaction isolation level is not supported with distributed transactions.  With the serializable transaction isolation level, only data that was committed at the start of the transaction plus those made by the transaction itself through INSERTs, UPDATEs and DELETEs can be accessed by a query.  Unlike the read committed level transactions, serializable isolation level transactions will not experience non-repeatable reads or phantoms. 

The idea is to prevent dirty reads. As I understand it, it's possible in a distributed transaction to get a non-repeatable read because the read consistency does not work across databases.

In the serializable transaction isolation level non-repeatable and phantom reads are not possible.

 The Serializable transaction isolation level can be set using the following:

  • Transaction level:

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
  • Session level:

    ALTER SESSION SET ISOLATION_LEVEL SERIALIZABLE;

Read Only Transaction Isolation Level

With the Read Only transaction isolation level, only data that was committed at the start of the transaction can be accessed by a query.  No modification to the data is allowed.

The Read Only transaction isolation level can be set using the following:

  • Transaction level:

    SET TRANSACTION ISOLATION LEVEL READONLY;
  • Session level:

    ALTER SESSION SET ISOLATION_LEVEL READONLY;

As shown, transaction isolation levels can be set at either the transaction level, which applies to that transaction only, or the session level, which applies to each transaction subsequent to the ALTER SESSION command.  The use of the ALTER SESSION command to set the transaction isolation level for the session can save some networking and processing costs that could be associated with having SET TRANSACTION at the start of each statement.


 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster