How to find slow running T SQL query


Top 10 ways to find slow running T SQL query

Followings are ways to identity and capture the slow running queries in SQL server database.


1.Use common activity monitor and task manager to get some overview

Right click the instance – Activity monitor

2.Use DMVs

Use Glenn Berry’s DMV pack

3.Check wait stats

Use Paul Randal’s DMV

4.Use Whoisactive

Use Adam Machanic’s script

5.Use SP_BiltZ

Use Brent Ozar’s script

6.Use server side trace

7.Use extended events

8.Use actual execution plan, if you have query

In SSMS, check mark the actual execution plan and run the query to tune further.

9.Use query store, if SQL version is above 2016

10.Use query store server-ver15

For SQL azure PaaS use insight dashboard

I will try to write separate post of 10 steps.

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 1 =