Problem Statement
Why is WITH (NOLOCK) risky on OLTP reads?
Explanation
NOLOCK (read uncommitted) sacrifices correctness for speed. You can see rows twice, miss rows, or read values that roll back later.
Use snapshot-based isolation for non-blocking reads while keeping logical consistency.
Code Solution
SolutionRead Only
SELECT * FROM orders WITH (NOLOCK); -- may be inconsistent
Practice Sets
This question appears in the following practice sets:
