Isolation levels

MySQL Course · lesson 8 of 21 · 5 min read

How much of other transactions you are allowed to see - and what it costs.

Open this lesson in the learning hub

Key points

  • Concurrent transactions can interfere; the isolation level decides how much.
  • READ COMMITTED: you only see committed data, but the same query can change between runs.
  • REPEATABLE READ (MySQL default): your view is frozen at the first read, so re-reads match.
  • SERIALIZABLE behaves as if transactions ran one at a time - correct, but heavily locking.
  • Higher isolation means more locking and less concurrency, so pick the weakest level that is correct.

Pick the weakest isolation level that is still correct - each step up costs concurrency.

This is a reading copy. The full lesson — with the visual explainer, the interactive lab and a Run button for the code — lives in the MySQL Course course, and every lesson in it is listed on the MySQL Course contents page.