Quantcast
Channel: Locking and Blocking – Curated SQL
Browsing index pages (25 articles)

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


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


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

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

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


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

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

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


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


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

Deadlocks In Apache Ignite

Prachi Garg discusses Deadlock-Free Transactions in Apache Ignite: When transactions in Ignite are performed with concurrency mode -OPTIMISTIC and isolation level -SERIALIZABLE, locks are acquired...

View Article

Analysis Services Locking And Blocking

Bill Anton shows how to figure out if your Analysis Services performance problem is due to locks: This past weekend, after one of my presentations on Analysis Services at SQL Saturday 520, an attendee...

View Article

WideWorldImporters Deadlocks

Kendra Little has a couple queries to force deadlocks in the WideWorldImporters database: SQL Server’s deadlock manager woke up, looked around, and saw that our two session windows were stuck. They...

View Article


Database Containment Checks

Parikshit Savjani discusses a nice little performance optimization in the latest versions of SQL Server 2014 and 2016: Starting SQL 2014 SP1 CU8, SQL 2014 SP2 CU1 and SQL 2016 CU1, the spinlock to...

View Article

Solr Lock Contention

Michael Sun shows how the Apache Solr team found and fixed a performance issue in their code: Based on this testing, lock contention, which usually results in a performance bottleneck and underutilized...

View Article


Testing Concurrency

Kendra Little walks through using OStress to test concurrency: Even though I’m taking out UPDLOCKS, the following race condition pattern can still occur Session A takes out an UPDLOCK, sees that key...

View Article

NOLOCK Bug

Brent Ozar reports on a NOLOCK bug in SQL Server 2014 SP1 CU6: While one transaction is holding an exclusive lock on an object (Ex. ongoing table update), another transaction is executing parallelized...

View Article


Blocking Merge Statement

Kendra Little walks through the MERGE command and potential blocking issues with it: The holdlock hint is a way to get serializable isolation level in SQL Server for a specific table, without having to...

View Article

Deadlocks Aren’t Blocks

Dave Mason shows the difference between a blocked process and a deadlocked process: Sometimes our end users may not know the difference between a deadlock and blocking. In fact, there are some that may...

View Article

ENCRYPTION_SCAN Locks

Suresh Kandoth explains ENCRYPTION_SCAN in a non-TDE scenario: There are three types of operations that acquire lock with the resource_type of DATABASE and resource_subtype of ENCRYPTION_SCAN: –...

View Article
Browsing index pages (25 articles)


Latest Images