13

This is a wordy option; there is no documentation and web searches are no help. When I'm executing queries, I don't notice a difference with the option checked or not checked. What does this setting control?

1 Answer 1

15

This is certainly a wordy option and it seems a bit ambiguous to me. You could take "stored procedure shortcuts" a number of ways; initially, I did not reach the conclusion that these were actually referring to the "Query Shortcuts" panel in Tools > Options > Environment > Keyboard, mainly because I was asked a question about them when I wasn't staring at the dialog (the option is, of course, on that very panel).

The option was added in response to the following Connect item (which has been orphaned because Microsoft killed Connect due to GDPR):

  • Connect #266994 : Allow shortcuts to be configured with specific execution and results options

There, Simon Sabin pointed out that if you execute a stored procedure using a keyboard shortcut (e.g. Alt+F1 for sp_help, or Ctrl+1 for sp_who), that execution would obey any query options you had set for the underlying query window (e.g. SET STATISTICS TIME ON;). This isn't always desirable (the example Simon used was getting a bunch of graphical execution plans when hitting Alt+F1).

So:

  • If you expect these query shortcuts to execute with all of the same options as the current query window, leave the box unchecked.
  • If you expect these query shortcuts to ignore any existing query options, check the box (and open a new query window, as it doesn't affect current windows).

Unfortunately there isn't a way to customize this per shortcut, as Simon requested, so you'll have to take it all or nothing.

2
  • Thanks Aaron. Such a little enhancement to such a wonderful feature. Commented Sep 26, 2019 at 14:04
  • Part of me wants to ask, "why on Earth would they expand the usage of a clearly incorrect term -- Stored Procedure -- which is the unfortunate header for that column, when they had the opportunity to fix the column header to instead be Query (which it very clearly is) and then use that correct term for this option -- Execute query shortcuts without...?". But, then another part of me doesn't really want to know ;-). Commented Jan 7, 2020 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.