Search code examples
sql-servervisual-studio-code

How do you get a SQL Server Query execution plan in VS Code?


How do you get SQL Execution Plan in VS code? Something like this:

enter image description here


Solution

  • Sorry to say, but you do not.

    Getting the raw data is not that complicated..

    SET SHOWPLAN_TEXT ON
    SET SHOWPLAN_ALL ON
    SET SHOWPLAN_XML ON
    SET STATISTICS PROFILE ON
    SET STATISTICS XML ON -- The is the recommended option to use
    

    But that deos NOT give you the visualization, and that is simply not built into VS Code. An extension WOULD possibly do it - but noone has to my knowledge written that one.

    Sorry, sometimes the answer is just "not happening".