What is a transaction isolation level?
A transaction isolation level is a setting that determines how much one transaction can see of changes made by others while those are still uncommitted.
In simpler terms, it's the degree of "separation" between concurrent transactions. The higher the level, the fewer conflicts, but the lower the performance.
The 4 isolation levels
The SQL standard defines 4 levels:
- Read Uncommitted, you can see even uncommitted changes from other transactions (risk of a "dirty read").
- Read Committed, you only see committed data, but it can change between two reads.
- Repeatable Read, the same read within a transaction returns identical data, though "phantom rows" are possible (new records added by another transaction).
- Serializable, maximum isolation; transactions behave as if they ran sequentially. Safe, but slow.
So the isolation level tunes the balance between data accuracy and system performance.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.