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...)

  • VERY nice. I look forward to using this extensively. Although right now the only thing it will reveal is that there are barely any indexes on the tables. :)
    – Jon Seigel
    Feb 5, 2011 at 15:00
  • 1
    This is now live -- it seems to be missing the icons, though.
    – Jon Seigel
    Feb 7, 2011 at 3:57
  • @Jon Wow - that was quick! I went to try and fix the icons but it seems that waffles has beaten me to it!
    – Justin
    Feb 7, 2011 at 4:51
  • yeah it was the asset packager - it moves all the css and js to the packaged directory
    – waffles
    Feb 7, 2011 at 4:52
  • 1
    Suggestion: The ability to see the execution plan without running the query. I've got one which is taking too long and would like to see the execution plan to know where to trim it but can't since it times out...
    – Basic
    Feb 28, 2013 at 23:40
  • 1
    @Basic Shouldn't be too hard, just need to change it to use SET SHOWPLAN_XML ON on instead of SET STATISTICS XML ON
    – Justin
    Mar 1, 2013 at 9:55
  • Thanks, I'd never really looked into how the plans were triggered so those had passed me by.
    – Basic
    Mar 1, 2013 at 11:32

1 Answer 1


I just merged this in.

A huge thanks from the team, it looks pretty awesome though there may be a few edge cases left to sort out.

Thank you for making data.se more awesome!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .