AlgoViz

Isolation levels

medium 26 min

Isolation decides what transactions that run at the same time may see of each other.

Where it shows up

The same pattern appears across everyday software.

  • PostgreSQL

    Its documentation says that read uncommitted behaves like read committed, and that its repeatable read does not allow phantom reads.

  • MySQL InnoDB

    The default is repeatable read. The manual says that consistent reads in one transaction use the snapshot of the first read, and that locking reads of a range use gap or next-key locks.

  • SQL Server

    Read committed is the default. If READ_COMMITTED_SNAPSHOT is off, which is the default on SQL Server, shared locks are used; if it is on, row versions.

  • Oracle

    Offers read committed as the default, serializable, and a read-only mode, according to its concepts guide.

  • SQLite

    Transactions are serializable, because there can be only one writer at a time, unless shared cache with read uncommitted is used.

  • CockroachDB

    Serializable is the default. Its documentation says that applications must handle retry errors at this level.