Types of Isolation Levels in DB2
DB2 supports the following isolation levels:
1. Uncommitted Read (UR)
In this isolation level, a transaction can read uncommitted changes made by other transactions. This level offers the lowest level of isolation but provides the best performance.
2. Read Stability (RS)
Read Stability isolation level ensures that a transaction can read data that has been committed by other transactions, but not data that is currently being changed by other transactions. It prevents dirty reads but allows non-repeatable reads and phantom reads.
3. Cursor Stability (CS)
Cursor Stability isolation level ensures that a transaction can read data that has been committed by other transactions and prevents dirty reads and non-repeatable reads. However, it allows phantom reads.
4. Repeatable Read (RR)
Repeatable Read isolation level ensures that data read by a transaction will not change during the course of the transaction. It prevents dirty reads and non-repeatable reads, but allows phantom reads.
5. Serialized (S)
In Serialized isolation level, transactions are executed sequentially and transactions can read data only after it has been committed by other transactions. This level provides the highest level of isolation but may lead to performance issues due to locking.
Please login or Register to submit your answer