Problem Statement
Which pairing of lock type and operation is most accurate for row-level locking?
Explanation
Writers take exclusive locks to update protected rows. Locking engines may take shared locks for consistent reads at some levels to coordinate with writers.
Intent locks communicate a transaction’s intent at higher granularity so engines can detect conflicts quickly without scanning fine-grained locks.
Code Solution
SolutionRead Only
-- conceptual UPDATE accounts SET balance = balance - 100 WHERE id=1;
Practice Sets
This question appears in the following practice sets:
