Quantcast
Channel: Locking and Blocking – Curated SQL
Browsing latest articles
Browse All 25 View Live

Automating Deadlock Execution Plan Collection

Michael J. Swart comes up with a system to collect execution plans at the time of a deadlock and log them to a table for further research: So How Do I Get To The Execution Plans? So when I look at a...

View Article


Blocking Notifications

Kendra Little shows how to set up blocking and deadlock notifications using base SQL Server components: OK, we’ve got notifications. We need SQL Server to give us more information on who is involved in...

View Article


Capturing Spinlock Stats

Paul Randal has a quick post to collect spinlock data for a specified time range: This is a quick post to blog a script that allows spinlock statistics to be captured for a defined period of time (as I...

View Article

Range Lock Deadlocks

Dmitri Korotkevitch looks at one scenario in which range locks can cause deadlocking: The range locks are usually acquired only in SERIALIZABLE isolation level; however, there is another, pretty much...

View Article

Page And Key WaitResources For Deadlocks

Kendra Little explains page and key information in deadlock graphs and blocking chains: 1.4) Can I see the data on the page that was locked? Well, yes. But … do you really need to? This is slow even on...

View Article


Wait Stats

David Alcock provides an introduction to wait stats and why they’re useful for performance tuning: So here are two different ways that we can use SQL Servers wait statistics for troubleshooting...

View Article

Locks In Sp_configure

Kendra Little discusses the locks entry in sp_configure: Each lock uses 96 bytes of memory. On the instance in question, 25,000 locks  = 2,400,000 bytes. That’s only 2.3 MB of memory devoted to locks....

View Article

NOLOCK, No Problem?

Arun Sirpal explains that NOLOCK not only takes locks, but also lets you read invalid data: A Sch-S (schema stability) lock is taken.  This is a lightweight lock; the only lock that can conflict with...

View Article


Optimistic Locking Via HTTP ETags

Kevin Sookocheff diagrams how to implement optimistic concurrency for a server which uses HTTP requests to handle resources like files: A conditional request is a request that may be executed...

View Article


Solving Blocking Without Sysadmin

Michael Swart has a story on blocking due to an edge case scenario: SQL Server was struggling to compile the procedure in time and the application wouldn’t let it catch its breath. The query optimizer...

View Article
Browsing latest articles
Browse All 25 View Live