Free Webcast on Thursday: Avoiding Deadlocks with Query Tuning

To fix blocking & deadlocks, you have 3 tools:

  1. Have enough indexes to make your queries fast, but not so many that they slow down delete/update/insert operations. (I cover that in the Mastering Index Tuning class.)
  2. Use the right isolation level for your app’s needs. (I cover that in the Mastering Server Tuning class.)
  3. Tuning your T-SQL to work through tables in a consistent order and touch them as few times as possible.

I’ll cover #3 in a one-hour webcast with Quest Software on Thursday at noon Eastern. Register here.

Previous Post
Databases Are Like Walk-In Coolers. #tsql2sday
Next Post
Updated First Responder Kit and Consultant Toolkit for October 2020

3 Comments. Leave new

  • Fearest deadlocks I’ve seen are with multi-database applications — the ones that access data/call sps on linked servers.

    The deadlock graphs are unlike anything in the textbooks and more like Kraken. . .

    Reply
  • BWAAAA-HAAAA! You forgot the most important aspect… write good, nasty fast, low resource usage code. 😀 Indexes won’t be used unless you know how to write code that will use them and trying to write code “in the same order” won’t necessarily help when high input rates occur.

    Heh… all hail the Kraken! 😀

    Reply
  • –Little joke

    begin tran
    go
    CREATE TYPE [dbo].[my_bigint] FROM [bigint] NOT NULL
    go
    DECLARE @a TABLE (a my_bigint);
    –exec sp_executesql N’DECLARE @a TABLE (a my_bigint);’

    –exec (‘DECLARE @a TABLE (a my_bigint);’)

    rollback

    Reply

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.