The Dirty Secrets of NOLOCK (50 minutes)
What happens when you use NOLOCK hints in your code, or set your isolation level to READ UNCOMMITTED in SQL Server? Learn the dirty secrets and potential uses of NOLOCK.
In this course, you’ll learn:
- What NOLOCK means
- Why NOLOCK can return incorrect results (and other problems)
- What allocation order scans are (and how to get them)
- Other risks and options for reading uncommitted data.
Course scripts are available at https://github.com/LitKnd/SQLWorkbooks/tree/main/dirty_secrets_of_NOLOCK.
This course contains closed captions in English for each video, plus a written transcript for each lesson.
- The dirtiest secret: NOLOCK returns garbage data (10 minutes)
- The fast alternative to NOLOCK: indexing (5 minutes)
- Why NOLOCK is a misnomer (7 minutes)
- Bad phenomena that can occur under NOLOCK (2 minutes)
- Uses for NOLOCK: admin queries and garbage data (5 minutes)
- Allocation order scans (13 minutes)
- A common error with NOLOCK – and more alternatives (6 minutes)