SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

This isolation level allows dirty reads. One transaction may see uncommitted changes made by some other transaction.

To maintain the highest level of isolation, a DBMS usually acquires locks on data, which may result in a loss of concurrency and a high locking overhead. This isolation level relaxes this property.

You may want to check out the Wikipedia article on READ UNCOMMITTED for a few examples and further reading.

Implements dirty read, or isolation level 0 locking, which means that no shared locks are issued and no exclusive locks are honored. When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. This option has the same effect as setting NOLOCK on all tables in all SELECT statements in a transaction. This is the least restrictive of the four isolation levels.

Sources:

https://stackoverflow.com/questions/2471055/why-use-a-read-uncommitted-isolation-level

https://dba.stackexchange.com/questions/106566/benefits-of-set-transaction-isolation-level-read-uncommitted

Last modified: October 27, 2021

Author

Comments

Write a Reply or Comment