SQL Server Interview Question #241

What is pessimistic concurrency control?

Advanced Transactions & Concurrency Senior Advanced

Detailed Explanation

Pessimistic concurrency assumes conflicts are sufficiently likely that access should be protected while work is in progress. SQL Server commonly implements this through locking under locking-based isolation levels.

For example, a transaction may hold locks that prevent another transaction from modifying the same rows until the first transaction commits or rolls back. This can provide strong consistency but may increase blocking.

Pessimistic concurrency is appropriate when conflicts are common or when business rules require exclusive access during a transaction.