'Include Live Query Statistics' using SQL Server Management Studio with Azure SQL Database? Is it supported?

Derek Horrall 196 Reputation points
2023-08-04T13:53:20.4333333+00:00

Should I be able to use 'Include Live Query' statistics to observe query runtime performance as data flows through? I see examples of this using 'on prem' SQL Server, but I am not clear if this is supported in Azure SQL Database. When I try to use it on a long running query, nothing is dynamic. I don't see rows being updated in query plan notes, etc. Is there a setting that needs change for this to work, or is it simply not supported?

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,897 questions
Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
100 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 32,991 Reputation points MVP
    2023-08-04T14:44:58.7266667+00:00

    Live Query is supported for Azure SQL as you can read in the documentation.

    However, Live Query may not work well on the following scenarios:

    1. With short or simple queries
    2. With queries that are blocked by another session
    3. With queries executed on an Azure SQL replica
    4. Queries using features not supported by Live Query like triggers, dynamic SQL or cursors.

    With long running queries Live Query usually works well as he is able to generate a live plan unless the query is blocked by another session or is involved on one of the scenarios I mentioned above.


  2. Erland Sommarskog 102.3K Reputation points
    2023-08-04T21:49:15.8433333+00:00

    So I tried this, and in my first test I saw the same thing as Derek. That is, I saw "Waiting for Query Plan" and when I got it, all was completed. But then I made a small modification to my query, and this time I saw a few updates. (This was a query that completes in a few seconds.)

    One thing to keep in mind is that with Live Query Plan there is a lot going forth and back, and you typically have a lot higher latency with Azure SQL Database than with an on-prem database.