In Microsoft SQL Server how can I get a query execution plan for a query / stored procedure?
Like with SQL Server Management Studio (already explained), it is also possible with Datagrip as explained here.
- Right-click an SQL statement, and select Explain plan.
- In the Output pane, click Plan.
- By default, you see the tree representation of the query. To see the query plan, click the Show Visualization icon, or press Ctrl+Shift+Alt+U