17.07.2015 Views

SQL Server Execution Plans - Grant Fritchey - SQLServerCentral.com

SQL Server Execution Plans - Grant Fritchey - SQLServerCentral.com

SQL Server Execution Plans - Grant Fritchey - SQLServerCentral.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 1: <strong>Execution</strong> Plan BasicsInterpreting XML plansOnce again, let's look at the same execution plan as we evaluated with the text plan.SET SHOWPLAN_XML ON;GOSELECT *FROM [dbo].[DatabaseLog];SET SHOWPLAN_XML OFF;GOListing 1.12Figure 1.8 shows the result, in the default grid mode.Figure 1.8The link is a pointer to an XML file located here:\Microsoft <strong>SQL</strong> <strong>Server</strong>\90\Tools\Binn\schemas\sqlserver\2003\03\showplan\showplanxml.xsdClicking on this link opens the execution plan as a graphical plan. In order to view theXML directly, you must right-click on the graphical plan and select Show <strong>Execution</strong> PlanXML from the context menu. This opens the XML format in a browser window withinthe SSMS. You can view the output from SHOWPLAN_XML in text, grid or file (default isgrid). You can change the output format from the Query | Results To menu option.A lot of information is put at your fingertips with XML plans – much of which we won'tencounter here with our simple example, but will get to in later, more <strong>com</strong>plex, plans.47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!