Free Webcast: Avoiding Deadlocks by Query Tuning

Company News
2 Comments

Free Webcast: Avoiding Deadlocks by Query TuningDeadlocks used to scare me.

I’d get the alert from a monitoring tool, and I’d look around to see if anyone was watching me. If the coast was clear, I’d… delete the notification.

Deadlocks were a mystery to me because I didn’t know how I was supposed to fix them. Sometimes the same queries could cooperate, and sometimes they couldn’t? The database server decided which one could pass, and which one would fail? What was I supposed to do about any of that? Besides, most of the time it wasn’t a problem – apps retried their queries, or users just ignored error messages and tried the process again.

But eventually, when I became a consultant, I had to confront my ignorance head-on and do something about it because some clients were having serious deadlock issues that they couldn’t ignore. I got help from smart people like Kendra Little, Erik Darling, and Jeremiah Peschka. I solved those client issues, claimed victory, and today deadlocks don’t scare me at all.

You can solve deadlocks in (at least) 3 ways:

  • Having enough indexes to make your queries go fast, but not so many that they cause problems for inserts, updates, & deletes
  • Using the right isolation level for your app’s needs, which typically isn’t the default – it’s RCSI
  • Or worst case, tuning your queries

I say worst case because tuning your queries is usually the most labor-intensive option. It requires knowing the queries involved in the deadlocks, being able to understand what about them is causing a problem, and knowing how to rewrite/reorder them in a way that’ll avoid deadlocks.

In this free session on April 29th sponsored by Idera, I’ll show you why your queries need to work through tables in a consistent order while minimizing the number of times you touch a table. I’ll use a real-world deadlock example and rewrite the query to resolve the issue. Whether you’re a DBA or developer, you’ll walk away with practical strategies you can apply immediately to make your queries deadlock-resistant and your applications more resilient.

If you can’t make it live, Idera will email registrants the recording later to watch on their own time. See you there!

Previous Post
Free Webcast Tomorrow: Fundamentals of Columnstore
Next Post
Tap Tap Tap – Short, Silent SQL Server Tutorials

2 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.