Sort statistics tracing

The sort_statistics_tracing extended event can be used to reveal details about the sorts being performed on your SQL Server. Adding the sql_text action and sending the output to a live data window we see this:

It’s possible to filter on the max buffers or bobs (big output buffers) to eliminate all but the larger sorts. In combination with the sort warning extended event we can identify the big sorts that are spilling to tempdb.

Advertisements
  1. Leave a comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: