Lesson Learned #103: Performance issue retrieving the deadlock list in Azure SQL Database.

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

Today, I worked on a service request that our customer is using one of our articles to obtain the deadlocks but the number the deadlocks generated is causing a delay of hours of the query execution that takes hours to complete.

 

Even if our customer tries to use filter is taking time because the deadlocks are saving internally in an extended event file, for this reason, before applying the filter SQL Enginee needs to read the entire content of the extended event file. For this reason, depending on the size of the extended event file it could take time. 

 

We suggested two solutions to avoid this problem:

 

  • Create your own Extended Event to capture our deadlock explained in this article.
  • Use Diagnostic Setting of the database that you could capture from the internal telemetry data, data, like Error, timeouts, Blocks, Deadlocks, etc.. and saving it in a Log Analytics workspace or storage account.

 

diagnosti.png

 

Enjoy!

Leave a Reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.