Wait Statistics in Azure SQL Database

Azure, TSQL
You need to be aware that you're going to see differences when you're working with Azure SQL Database when it comes to wait statistics. If you're running a v12 Azure SQL Database (and if you're not, go fix it), you can run a query against sys.dm_os_wait_stats. Here's the output for the TOP 10 waits ordered by wait time on one of my databases: Everything you're used to seeing, right? Well... not quite. This is Azure SQL Database. So, let's use sys.dm_db_wait_stats, a DMO that is only available within Azure. This lists waits by database. The TOP 10 here are: You'll notice that these results are wildly different from those above. What we're looking is largely a server versus a database, but not completely. I mean that sys.dm_os_wait_stats is showing the waits for the…
Read More