Tag: Locking

  • Troubleshoot SQL Server Blocking, Step by Step

    Blocking isn’t a bug, it’s SQL Server enforcing correctness: one session holds a lock, another wants a conflicting one, and it has to wait. Most blocking resolves in milliseconds and nobody notices. The problem is blocking that doesn’t resolve fast, a query queued behind a session that’s holding a lock far longer than it should,…

  • What WITH (NOLOCK) Actually Does in SQL Server

    Almost every SQL Server developer has copied WITH (NOLOCK) onto the end of a query at some point, usually because someone said it “makes queries faster” or “avoids blocking.” Both of those things are technically true. What rarely gets explained is what you’re trading away to get them. WITH (NOLOCK) doesn’t make a query faster…