How do you collect statistics from SQL Server?

sys.dm_exec_query_stats seems to be a very useful function for collecting statistics from your database, which you can use as a starting point for finding queries that need to be optimized. choice * gives a few cryptic results, how to make the results readable? What types of requests do you get from this? Are there any other features or queries that you use to get performance statistics?

+3
source share
2 answers

To make the results useful, you need to cross-match the information with several other DMVs, as well as concentrate on analyzing and tuning to the most poorly executed queries.

Here (one of them I made earlier) is an example of using the DMV that you mentioned to determine the most expensive SQL Server queries.

How to identify the most expensive SQL Server queries using DMV

You can easily expand this to look at other indicators.

If you want to tune performance tuning for yourself, you should consider installing freely available SQL Server Dashboard performance reports .

SQL Server, , -, ..

+4

"set pagesize 0".

-1

Source: https://habr.com/ru/post/1715998/


All Articles