3

When you include the execution plan in a query, then click the Execution Plan tab, the URL is updated to include an anchor to #executionPlan. However, when you follow this link, the query does not generate the execution plan, you still have to check the box and re-run.

Example: https://data.stackexchange.com/stackoverflow/query/622784/example#executionPlan

Expected: Include execution plan checked, execution plan generated, Execution Plan tab active.

Actual: Include execution plan not checked, no execution plan generated, Execution Plan tab not visible.

Note that anchors to e.g. #messages work fine, which isn't consistent with #executionPlan.

(Browser is Chrome 55, Windows, if it matters.)

1
  • @rene Nice, thanks. Actually I was wondering what happened to the "opt." parameters in general. It used to add one in the permalink for plots (meta.stackexchange.com/questions/236770/…). I wonder if I should transform this info a bug/request about opt.withExecutionPlan not being added to the URL when the box is checked. In any case good find, this makes linking to the plans possible.
    – Jason C
    Commented Feb 4, 2017 at 1:56

1 Answer 1

2

I don't think that does what you hope it does. You only navigate to the executionPlan tab with that URL.

By default the query isn't run with the plan and the plan isn't cached.

To get a link that sets both text and execution plan options add this as query parameters (there is no UI link that will have these options, you have to handcraft it):

?opt.textResults=true&opt.withExecutionPlan=true

And here is the working example link that when clicked shows you:

Shows SEDE run form with Run Query button and checkboxes Text-Only Result and Include Execution plan checked

All you have to do is click Run Query.

Note that if the query is already cached (aka it has been run at least once since last Sunday) you get the default view and result first. Click "Run Query" to get a result that meets your selected options.

You must log in to answer this question.

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