Is there anything similar to WITH(NOLOCK) of SQL SERVER in ORACLE?

Asked

Viewed 8,184 times

5

I recently discovered in SQL SERVER the option of not blocking tables for insertion while reading some data, and with this gain some performance in some specific situations.

I searched, but I did not find anything similar on ORACLE. Does anyone know how to say with property if it really does not exist?

Or if there is, as it would be to use?

  • It is something WELL, but WELL "tricky", but within a context of a PL/SQL you can use PRAGMA AUTONOMOUS TRANSACTION, I think that’s the kind of behavior you’re looking for. I used this in a stored trial that today is in production on a client and the demons of programming haunt me to this day.

1 answer

6


According to this question in the OS in English, the performance gain occurs when the NOLOCK is used in the clause SELECT.

The answer to Oracle is: No, it doesn’t exist.

As per the version documentation 12c (in English):

Oracle database does not allow "dirty reading" (Dirty read), that occurs when a transaction reads data from another transaction that has not yet ended (Uncommitted).


Oracle automatically handles the level of isolation of the queries with the aim of achieving the best performance and, at the same time, ensuring the consistency and integrity of the data.

In the link to the documentation, there is a detailed explanation on the subject:

9 Data Concurrency and Consistency

In the Oracle forum there is an old question, but similar to this.

Some of the answers explain why this concept above is important to allow database scalability (Oracle):

READ UNCOMMITTED or NOLOCK on Oracle

Browser other questions tagged

You are not signed in. Login or sign up in order to post.