This is a request to merge some changes I've made to the Stack Exchange Data Explorer.
I've add the ability to view / download query execution plans - a tick of the "Include execution plan" check box should get you an extra "Execution Plan" tab with your results:
You also get an extra "download execution plan" link which lets you download the xml form of the query plan for viewing in SQL Server Management Studio and the like. (You could do this before but you had to know the proper syntax and faff around with xml and it all got a bit messy)
After much deliberation I think that these changes are probably now ready for public consumption and so the source code for these changes can be found here:
I've tested the changes in Chrome (9.0.597.84), Firefox (3.6.3), Opera (11.01) and IE8. The lines don't appear in IE8 due to lack of support for the canvas element, and IE7 makes a complete mess of it because of the lack of support for display: table
.
The code for producing the HTML query plan can be found separately here:
The icons are modified from the Fat Cow "Farm Fresh" icon pack. (Creative Commons Attribution required so a link probably needs to go somewhere or something? - I don't know very much about these sorts of things...)
Finally, I've done my best to make sure that the HTML query plan includes as much information as possible, but it's entirely possible probable that I've missed things - if anyone finds something that looks wrong or could be included then just get a copy of the .xml execution plan to me and I'll take a look.
Feedback / comments please - I just hope I haven't broken anything! :-) (like the caching, someone might want to check that...)
SET SHOWPLAN_XML ON
on instead ofSET STATISTICS XML ON