SHOWPLAN_XML

When SET SHOWPLAN_XML is set to ON, SQL Server does not execute the query but returns execution information for each T-SQL batch as an XML document. The execution plan information for each T-SQL batch is contained in a single XML document. Each XML document contains the text of the statements in the batch, followed by the details of the execution steps and operators. The document includes the estimated costs, numbers of rows, indexes used, join order, and types of operators performed.

The SHOWPLAN_XML option generates the same XML output as the Show Estimated Execution Plan option in SSMS. In essence, you are looking at the same information, just without the pretty pictures. As a matter of fact, you can save the output from the ...

Get Microsoft® SQL Server 2008 R2 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.