Spinlocks
Ewald Cress investigates spinlocks: SQL Server spinlocks are famously elusive little beasties, tending to stay in the shadows except when they come out to bother you in swarms. I’m not going to add to...
View ArticleCapturing Blocking Information
Erin Stellato shows us how to capture details when processes are blocked: To view the output from extended events you can open the .xel file in Management Studio or query the data using the...
View ArticleConcurrency Simulator
Michael J. Swart has come up with a concurrency simulator: Capacity planning is difficult for DBAs who expect growth. Will there be enough CPU, Memory or I/O to serve the anticipated load? One category...
View ArticleChoosing Between Optimistic Concurrency Levels
Kendra Little has a cheat sheet for comparing the two optimistic concurrency levels: SQL Server offers two flavors of optimistic locking for traditional disk-based tables: Read Committed Snapshot...
View ArticleLocking Basics
Jason Brimhall has an introductory-level discussion of locking in SQL Server: A fundamental component of SQL Server is locking and locks. Locks within SQL Server are critical to the proper functioning...
View ArticleENCRYPTION_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 ArticleDeadlocks 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 ArticleBlocking 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 ArticleNOLOCK 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 ArticleTesting 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 ArticleSolr 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 ArticleDatabase 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 ArticleWideWorldImporters 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 ArticleAnalysis 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 ArticleDeadlocks 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 ArticleAutomating 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 ArticleBlocking 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 ArticleCapturing 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 ArticleRange 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 ArticlePage 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