Generate query stats report from AzureDB

Vijay Kumar 2,016 Reputation points
2022-12-02T20:23:53.517+00:00

Hi Team,

We have a requirement from our apps team that, they want report like,
266754-image.png

Is it possible to generate such kind of reports from AzureSQLDB?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 27,642 Reputation points Microsoft Employee
    2022-12-05T02:44:33.613+00:00

    Hi, @Vijay Kumar Thanks for posting your question in the Microsoft Q&A forum.
    You can generate that output using T-SQL (I’m not sure what you mean by “report” – if you want something generated automatically, etc.).

    It would be important to understand how you define buffer gets %Total, and whether CPU Time(s) and Elapsed Time(s) are average (total/execution count). Also, what SQL Id is? how you generate that. In Azure DB I would tell you to use query_hash. And you would have to define where you are pulling SQL Module from.

    You could pull this info from the DMVs (e.g. dm_exec_query_stats and a couple others), but then it only represents perf since the plan has been in the cache. If you want something that is more defined (e.g. across 30-minute intervals), then you can leverage Query Store.

    Please let us know if any further queries.

    Regards
    Geetha


0 additional answers

Sort by: Most helpful