Skip to content

Using SQL Management Studio Execution Plan

March 29, 2017

Its been a long while since my last programming post, but I have been doing a lot of SQL work on the backend over the last few months.

I had been told on Monday by a colleague I had rarely spoken to about using the SQL Profiler a lot more as it involves timing individual SQL queries/executions in the SQKL database, it is soemthing I always oversee. However trying to use this relatively unknown tool that I keep forgetting on a Monday morning didn’t work, it was perhaps I did a SQL database upgrade to 2014 but the dlls were missing.

Instead he told me to use the Execution plan, what is this? It is a detailed overview of the components of an SQL statement you wrote which analyses the cost % ratio of the total execution query, which I find equally as good as the SQL Profiler. See the screenshot below.

Execution Plan

As you can see in the screenshot diagram, the last query key lookup clustered index is suggested! Yes it makes suggestions to adding the query, in this situation it is to add a clustered index on several of the fields for a particular table to potentially improve the speed of the lookup of this complex query! Thanks!!!

 

Advertisements

From → Uncategorized

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: