All you need to know about Database transaction concurrency control — locks, Isolation level, MVCC

LORY
7 min readSep 17, 2023

Explained in 15 mins, all of them.

Begin

When talking about database transactions, I often see developers(including myself) confused with the below locks:

  • S(shared) lock, X(exclusive) lock
  • Pessimistic lock, Optimistic lock
  • table lock, row lock, page lock, record lock, gap lock, next-key lock

--

--

LORY

A channel which focusing on developer growth and self improvement