question

CharlieLor-4693 avatar image
0 Votes"
CharlieLor-4693 asked Cathyji-msft commented

How to track down performing issues?

I have setup a trace capturing session and saved the file. Now, how do I find out which query(s) cost the most or least optimized? Thanks!

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @CharlieLor-4693,

Did the reply could help you. If the response helped, do "Accept Answer". If it is not, please let us know.

0 Votes 0 ·

1 Answer

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @CharlieLor-4693,

There are three SQL server query optimization steps:

1.Detect critical parts that need to be improved.
2.Analyze problematic query execution to find out which actions cause poor performance.
3.Optimize queries by improving query execution plans.

Before you start analyzing and optimizing SQL queries, it’s essential to understand which queries require optimization. To determine this, you can use Microsoft SQL Server query optimization tools like SQL Server Profiler. It helps you trace queries received by the server, see the text of the queries, and check their execution times.

Please refer to this blog How to Optimize SQL Queries: Helpful Tips and Techniques, it show you detail steps and screenshots.

Hope this could help you.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.