Locking

Category: locking

Perks for My SQLPASS Summit Precon: Prevent Fake News in Your Data! Isolation Levels Demystified

Perks for My SQLPASS Summit Precon: Prevent Fake News in Your Data! Isolation Levels Demystified

I’m proud, giddy, and just plain overly excited to be giving a pre conference session at the SQL PASS Summit in Seattle, Washington on November 5, 2018.

This is going to be a fun, demo-packed day which will teach you skills you can use throughout your career as a developer, database administrator, or data professional.

Continue reading

The Case of the Rowgroup Deadlock in a Columnstore Index

The Case of the Rowgroup Deadlock in a Columnstore Index

on September 21, 2017

I came across a fun deadlock when writing demos for my session on the Read Committed isolation level this week. (It’s OK to call it “fun” when it’s not production code, right?)

I was playing around with a nonclustered columnstore index on a disk-based table. Here’s what I was doing:

Continue reading

Which Locks Count Toward Lock Escalation?

Which Locks Count Toward Lock Escalation?

A little while back I wrote about Why Indexes Reduce Locks for Update and Delete Queries.

I got a great question on the post from Zac:

What’s not super clear is why it takes out a lock on the whole table, is this because it does a lock escalation as a result of the Full Scan? Will this always happen, or is there a threshold of record update counts where this will occur?

This was tough to answer in just a comment, so I promised a full post on the topic.

Continue reading

Why Indexes Reduce Locks for Update and Delete Queries

Why Indexes Reduce Locks for Update and Delete Queries

on March 14, 2017

Category: index-tuning , locking

Indexes help queries run faster in SQL Server for several reasons. One of those reasons is that indexes can help your update and delete statements lock fewer rows. And I’m not only talking about shared locks, either.

Continue reading

The Top 3 Mistakes I Made Fighting Blocking

The Top 3 Mistakes I Made Fighting Blocking

on February 16, 2017

Category: blocking , deadlocks , locking

At the beginning of the “Troubleshooting Blocking and Deadlocks” course, I mention that it took me a long time to get into using the tools I show in the course.

The tools are all free, and many of them are built into SQL Server.

Update: the course itself is now free, too!

Continue reading