All Questions
Dealing With Contention medium

When should you use Pessimistic Locking (`SELECT ... FOR UPDATE`)?

  1. A When you want to be faster.
  2. B When you are reading data only.
  3. C When contention is high and the cost of retrying a failed transaction is very expensive (e.g., long calculation). It prevents conflict by serializing access upfront.
  4. D When using NoSQL.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions