Include only slow queries in a SQL Server Profiler trace

SQL Server Profiler is super useful for seeing what queries are going across the wire from your app to your DB. It can be particularly useful for finding slow queries for example when you’ve kicked off a run of your integration test suite or are tracing in production.

To filter in only slow queries use the Column Filters... button highlighted below and set your duration threshold. In the below case I want to see only queries with a duration of 500 milliseconds or greater…

Note… ideally avoid tracing in production as it has an impact on the server. If you can’t replicate prod in a staging environment and need to trace directly against prod filter out as many events as possible and let it run for only a small amount of time to keep its impact to a minimum.

Leave a Reply

Your email address will not be published.