Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does oracle allow the uncommitted read option?

Tags:

oracle

In db2 a query with a 'with ur' clause allows the query to be an uncommitted read and so does the 'with nolock' clause in mysql. Is there such an option in oracle too... If not why??

like image 510
sarego Avatar asked Oct 16 '08 11:10

sarego


1 Answers

Tom provides a great answer to this: On Transaction Isolation Levels

He says:

The READ UNCOMMITTED isolation level allows dirty reads. Oracle Database doesn't use dirty reads, nor does it even allow them. The basic goal of a READ UNCOMMITTED isolation level is to provide a standards-based definition that allows for nonblocking reads.

...

Now, a database that allowed a dirty read ... not only does it return the wrong answer, but also it returns ... [an answer] ... that never existed in the table. In a multiuser database, a dirty read can be a dangerous feature. Personally, I've never seen the usefulness of it...

The point here is that dirty read is not a feature; rather, it's a liability. In Oracle Database, it's just not needed. You get all of the advantages of a dirty read—no blocking—without any of the incorrect results.

like image 128
Nick Pierpoint Avatar answered Sep 29 '22 16:09

Nick Pierpoint