PlanSmart
PlanSmart is a WPF / .Net 3.5 tool I created to help teach myself Linq/WPF. It operates on Sql Server 2005 xml query plans, and renders them in a tree, similar to the normal graphical execution plan display inside SSMS.
PlanSmart then provides several different visualisations to help determine the bottleneck portions of large plans (something that is tedious at best with a normal graphical plan), as well as exposing the Missing Index functionality built into Sql 2005 that isn't available inside SSMS until Sql 2008.
Remember that this is a free tool, developed as a personal R&D effort, and is not
feature complete, is barely tested, and is certainly going to contain bugs, holes,
flaws, dodgy WPF styling and other bonuses. Hopefully it's also makes diagnosing
large query plans slightly more enjoyable than before.
Download PlanSmart
Now at V1.4
Changes:
- Missing indexes tab hidden unless something to show, makes it much easier to know when to pay attention to it.
- Tweaked zoom code so it follows the mouse cursor much better than before... not as nice as I'd like, but it's getting there.
- Segementation nodes (SEGMENT, AGGREGATE etc) now have their own node colouration.
- Zipped files here (260kb).
Using PlanSmart
- Generate a SQL Server XML plan, the easiest way is right-clicking on a normal graphical execution plan, and Save-As'ing it to disk as a .sqlplan file.
- Open this file in PlanSmart, either using the Open button or dragging the file from Explorer over the PlanSmart window. If you have the raw xml available from "set statistics profile on" you can also copy/paste using the context-menu inside PlanSmart.
- You can navigate around your plan by Ctrl+MouseWheeling to zoom in and out, and pan around by drag/dropping inside the plan. The zoom slider and scrollbars (may) also work.
- The tabs at the top display any missing index information returned by the plan, as well as access to the raw xml if you like pain.
What's Missing
Known deficits + stuff I'd like to add, in a very rough priority order:
- Lots of operators don't yet have customised tooltip information, so a sort operator doesn't (yet) tell you what columns were sorted.
- Doesn't like nodes with more than 2 children (Union/Concatenation). The nodes draw correctly, but the arrows do not.
- Operators don't have individualised icons... I don't know if I care enough to fix this.
- Visualisations are currently targeted at per-operator, or operator+parent comparisons, some heuristic'y plan-wide analysis would be cool.
- Integration directly into SSMS?? It's been described as '...something of a black art'.
Where to from here?
This is available for public use as-is. I may open-source this at some point, or open up some plug-in API's for visualisation. I'm keen for any sort of feedback on the good, the bad, the ugly or the ridiculous to PlanSmart@wokket.com
If the community decides this is a tool worth using, I'd definately invest more time in it. If this page remains a barren wasteland of server space, I may still update it, or not.
Enjoy :)