---
answer: direct
beat: dev-practices
source: 1 article · updated: November 14, 2026
---

When is pessimistic locking the better choice?

When conflicts are frequent or retries are costly or unsafe: scarce inventory with many buyers, seat reservations, or work that has side effects before the final write. Locking serialises access so each transaction succeeds once, at the cost of waiting and potential deadlocks.

Answered in

Pessimistic vs Optimistic Locking: Choosing by How Often Your Writes Collide

Lock first or check at commit? Version columns, SELECT FOR UPDATE, retry logic and the contention numbers that decide which strategy fits.

Crashtech Editorial November 14, 2026 Development Best Practices

Read the full analysis

Other questions this article answers

More development best practices questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Development Best Practices beat.