Reputation: 29
What's the differences between these two transaction's levels: READ WRITE
and ISOLATION LEVEL SERIALIZABLE
?
As I understand, READ WRITE
allows dirty reads, while ISOLATION LEVEL SERIALIZABLE
prevents data from changing by other users(think that I'm mistaken here) or just read that data that is available at the beginning of the transaction(don't see the data, that has been changed by other users during my transaction).
Upvotes: 1
Views: 1083
Reputation: 6654
You can find detailed information about this topic on the oracle site.
Basically READ COMMITTED
allows "nonrepeatable reads" and "phantom reads", while both are prohibited in SERIALIZABLE
.
If non-repeatable reads are permitted, the same SELECT query inside of the same transaction, might return different results based on when the query is issued. Other parallel transactions may change the data and this changes might become visible inside your transaction.
If phantom reads are permitted, it can happen that when you issue the same SELECT query twice inside of one transaction, and another transactions inserts rows into the table in parallel, these rows might become visible inside of your transaction, but only in the resultset of the second select. So the same select statement will return for example 5
rows the first time and 10
rows the second time it was executed.
Both properties are similar, but the first only says something about data which may change, while the scond property says something about additional rows which might be returned.
Upvotes: 1