Isolation Levels — part XI: Read Uncommitted

Franck Pachot
1 min readDec 13, 2023

The Read Uncommitted isolation level is designed to prevent dirty reads, which are changes made by other transactions that have not yet been committed. Such changes should not be visible to other transactions. Non-MVCC databases are forced to lock the row being read to ensure that uncommitted transactions are not currently modifying them. These read locks can potentially block the application, for instance, in scenarios where a DBA is counting the rows of a large table. Non-MVCC databases had to allow such dirty reads for these operations, even if they returned inconsistent results.

With modern databases that use MVCC, you can safely ignore this isolation level. MVCC provides a consistent read time without relying on read locks. When a read encounters an uncommitted change, held with a write lock, it will just read the last committed version before the read time. The Read Committed isolation level offers the same concurrency level while avoiding the exposure of uncommitted changes. In PostgreSQL or YugabyteDB Read Committed will be used when setting Read Uncommitted. It exists for SQL compatibility, but you should never have to set it.

Originally published at https://dev.to on December 13, 2023.

--

--

Franck Pachot

Developer Advocate for YugabyteDB (Open-Source, PostgreSQL-compatible Distributed SQL Database. Oracle Certified Master and AWS Data Hero.