Sign in to track progress and bookmarks.
When two users try to update the same row at the same time, who wins? How much "In-Progress" data can other users see? Isolation Levels define the balance between Data Consistency and Performance (Concurrency).
Snapshot isolation provides the consistency of a strict level but without the Blocking. It uses Row Versioning in TempDB. When you read, you see a "Snapshot" of the data as it was when your query started. Writers don't block Readers, and Readers don't block Writers.
Q: "Why should I avoid using 'WITH (NOLOCK)' on every table?"
Architect Answer: "Developers use NOLOCK to 'speed up' queries by preventing blocks. However, NOLOCK can result in **Duplicate Rows** or **Missing Rows** in your result set if a Page Split occurs while you are reading. It can even cause your query to crash with an 'Internal Error'. Instead of NOLOCK, you should use **Read Committed Snapshot Isolation (RCSI)** at the database level, which gives you the same speed without the risk of reading corrupt data."
Quizzes linked to this course—pass to earn certificates.
On this page
1. The Four Standard Levels 2. SNAPSHOT Isolation (The MVP) 4. Interview Mastery