Using SQL Sentry Plan Explorer

 This is a quick tip that I hope will help you use SQL Sentry’s Plan Explorer tool. It’s a really great tool for viewing Execution Plans – something that SSMS isn’t too great at.

If you don’t have the tool then you can download it for free from http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp.

SSEPE01_thumb.pngSo, just a little setup is required before I can show you the tip in full. Create a directory on your Desktop called Execution Plans and copy a shortcut to the Execution Plan Explorer application into it.

Once that is set you need an execution plan, so off to SSMS and write a query. Here’s one I prepared earlier. Well, to be brutally honest its a simple select from an AdventureWorks view but there’s a plan we can use. Click the Include Actual Execution Plan button
SSEPE02_thumb.png
and then run the query. When the query completes you get an extra tab that contains the execution plan SSEPE03_thumb.png

Click that tab, and then right click in any part of the plan to get the popup menu to save the plan
SSEPE04_thumb.png

Now save the plan in the directory we created right at the start, giving it a name that is descriptive so that you can identify it easily later on. Here is the neat bit. No need to open the tool and then search for SSEPE05_thumb.pngyour plan or find the plan and go through the ‘open with’ dance. Simply go to the directory on your desktop and drag the execution plan on to the Plan Explorer tool shortcut. It will open the plan and let you examine your query’s plan.

Lovely.

SSEPE06_thumb.png

If you are new to the tool then Aaron Bertrand Twitter|Blog has done a great explanation of how it works here – http://www.mssqltips.com/tip.asp?tip=2170.