How to take Query perf baseline

Sam 1,476 Reputation points
2023-02-22T17:02:28.2566667+00:00

Hi All,

We don't have baselines in our env. I mean, no monitoring tool. We use sp_whoisactive every 5 mins. Currently, we are facing some query performance issues.

Want to know what are the things to be considered or how to take query performance baselines? like rows counts, indexes, execution plans etc..

Also, suppose I want to test the same query in sub-prod env, do we need to restore entire prod database of the issue day or just dump those required tables/objects into a testdb and then do the testing on the smaller dataset testdb?

Please suggest.

Thanks,

Sam

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 119.9K Reputation points MVP
    2023-02-22T20:10:07.52+00:00

    For the baseline, Query Store is your answer right there.

    For testing querie, restoring a backup better, since if you sciprt tables, the statistics histogramme may come out different. But if the database is very big, you may need to compromise.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.