-- Turn the feature on
set statistics time on
-- Turn the feature off
set statistics time off
Show SQL queries in different ways. We all know the typical GRID view of our query, which displays our data in table cells. There are other ways of viewing our data besides the GRID view. These options are available either from the [Editor Toolbar] or by their shortcut keys.
[Results to Text (Ctrl+T)]
[Results to Grid (Ctrl+D)]
[Results to File (Ctrl+Shift+F)]
[Showplan_all]. This feature will let you see how your query is executed. Returning rows that form a hierarchical tree represents the steps the SQL Server query processor takes as it completes each statement.
-- Turn the feature on
set showplan_all on
-- Turn the feature off
set showplan_all off
You can set showplan_all to on, toggle through the results as [TEXT] and [GRID], and save the tree data to [FILE].
[Include Actual Execution Plan]. This feature is handy when you are having issues with your query statements. Running it will let you see exactly what your query is doing in a graphical interface, and whether there are any errors or warnings that need your attention.
To make this work, you must have the [showplan_all off]; if it is ON, it will not. Make sure it is set to off.
[Actual Execution Plan (Ctrl+M)] If your database is getting hits on this query, you can view the live data coming in. This is handy as you see how your query performs in real time. Include Live Query Statistics
[Include Client Statistics]
Includes a Client Statistics window that contains statistics about the query, the network packets, and the elapsed time of the query