STATISTICS XML
Similar to the STATISTICS PROFILE
option, the SET STATISTICS XML
option allows a query to execute while also returning the execution plan information. The execution plan information returned is similar to the XML document displayed with the SET SHOWPLAN_XML
statement.
To set the STATISTICS XML
option for individual query sessions in SSMS or another query tool, you type the following statement:
SET STATISTICS XML ONGO
Note
With all the fancy graphical tools available, why would you want to use the text-based analysis tools? Although the graphical tools are useful for analyzing individual queries one at a time, they can be a bit tedious if you have to perform analysis on a number of queries. As an alternative, you can put all the ...
Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.