Set Statistics Time/IO For Each New Query Window

I doubt that I’m alone in the experience of beginning to troubleshooting a slow query, executing, and clicking over to the messages tab to get some juicy information only to find…

Nothing too helpful. Far too often I would be bouncing between query windows and run a query only to realize my mistake of not running

SET STATISTICS IO, TIME ON

This can be especially frustrating when that query you were waiting on takes its sweet time to run (because who’s checking IO/TIME for fast queries). Thankfully, this is a step you can skip if you turn them on my default for each new query window in SSMS.

Let SSMS Handle it

Select Tools > Options:

Scroll down to Query Execution > SQL Server > Advanced:

Highlighted above are the two selections to checkbox. Click OK.

This won’t take affect the existing query window if you have one open a new query window and run the same script:

We have some information to use while troubleshooting.

If you’re frequently using the same SSMS to connect out to SQL servers then this can save you a little bit of time and frustration. It’s not that big of a deal but it’s always nice having one less thing to worry about.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s