Read uncommitted

Read uncommitted is the lowest isolation level. This isolation level defines that a transaction may read data that is still uncommitted by other transactions, which means that the data is not consistent with other parts of the table or the query. This isolation level ensures the quickest performance because data is read from a table block directly, and there is no need for further processing, validation, or other verification; but it may lead to some issues, such as dirty reads.

Let's see the following diagram:

In the preceding diagram, Transaction A writes data; meanwhile, Transaction B reads that same data before Transaction A commits it. Later, Transaction A decides to rollback, due to some exception. Now, the data in Transaction B is inconsistent. Here, Transaction B was running in a READ_UNCOMMITTED isolation level, so it was able to read data from Transaction A before a commit occurred.

Note that READ_UNCOMMITTED can also create issues like non-repeatable reads and phantom reads. A non-repeatable read occurs when a transaction isolation selected as READ_COMMITTED

Let's see the READ_COMMITTED isolation level in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset