This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
NOLOCK Double Counting: One Employee, Two Lunches

NOLOCK Double Counting: One Employee, Two Lunches

September 22, 2026
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Index, SQL Lock, SQL Transactions

NOLOCK double counting is how three people in a lunch line turn into four lunches. Nothing was inserted. One row moved ahead of the scan and got read twice. I tested it on SQL Server 2025 and share a query that catches it on your own table.

Read More
NOLOCK Can Miss Rows: The Order That Was Never Missing

NOLOCK Can Miss Rows: The Order That Was Never Missing

September 10, 2026
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Lock, SQL Transactions

Yes, NOLOCK can miss rows. A row can vanish from your report while it sits safely in the table. Nobody deleted it. The read simply walked past it.

Read More
The same four pages. A row moves from page 4 into the empty slot on page 1 after the scan has passed, page 1 ends with four rows that were counted as three, and the query answers 11

NOLOCK: Why It Counts Some Rows Twice and Misses Others

September 4, 2026
Pinal Dave
SQL Performance
SQL Index, SQL Lock

Everybody knows NOLOCK can show uncommitted data. Far fewer know why it counts some rows twice and misses others, with nothing rolled back. Let me show you.

Read More
iderablogimage

The Locks, Blocks, and Deadlocks of SQL Server: Unraveling the Knots

September 27, 2023
Pinal Dave
SQL Tips and Tricks
Deadlock, Idera, SQL Lock

SQL Server is no exception. However, it often leads to three common phenomena – locks, blocks, and deadlocks. SQL Diagnostic Manager SQL Server

Read More
Locking

SQL SERVER – Locking, Blocking, and Deadlocking: Differences, Similarities, and Best Practices

June 22, 2023
Pinal Dave
SQL Performance
Deadlock, SQL Lock

Understanding SQL Server Deadlocks: A Beginner’s Guide, and after reading it, lots of people have asked me the difference between Locking, Blocking, and Deadlocking.

Read More
Gouache painting of a seedling in a small pot beside a tall grown tree with a vermilion watering can between them

Implicit Transactions in SQL Server: The Setting That Leaves Work Open

May 23, 2023
Pinal Dave
SQL Tips and Tricks
SQL Connection, SQL DMV, SQL Lock, SQL Transactions

Implicit transactions make SQL Server open a transaction on the first data statement and keep it open until a COMMIT or ROLLBACK. This post shows what starts one, how @@TRANCOUNT counts it, why a second session waits, and how to find and clear the sessions that left work open.

Read More
Gouache painting of a snail with a vermilion shell crawling along a long boardwalk

Long Running Queries in MySQL: Find Them in Two Ways

June 16, 2022
Pinal Dave
SQL Performance
Idera, MySQL, SQL Lock

Find long running queries in MySQL with two built-in methods: the slow query log and the Performance Schema digest table. See the settings, a ready query and how to choose between them.

Read More
1 2 3 4 … 10 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com