30.06.2013 Views

SQL Server Execution Plans - Red Gate Software

SQL Server Execution Plans - Red Gate Software

SQL Server Execution Plans - Red Gate Software

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.

Figure 7.6<br />

Chapter 7: Special Datatypes and <strong>Execution</strong> <strong>Plans</strong><br />

The physical flow starts on the top right of the plan, which is the bottom right portion of<br />

Figure 7.6 (to see the whole plan, I've graphically split it in half). A quick scan of the plan<br />

reveals no new XML icons. All the OPENXML statement processing is handled within the<br />

Remote Scan icon. This operator represents the opening of a remote object, meaning<br />

a DLL or some external process such as CLR object, within <strong>SQL</strong> <strong>Server</strong>, which will take<br />

the XML and convert it into a format within memory that looks to the query engine like<br />

a table of data. Since the Remote Scan is not actually part of the query engine itself, the<br />

optimizer represents the call, in the plan, as a single icon.<br />

Examining the estimated plan reveals none of the extensive XML statements that are<br />

present in this query: even the XML stored procedures sp_xml_preparedocument and<br />

sp_xml_remove document are referenced by simple logical T-<strong>SQL</strong> icons, as you can see<br />

in Figure 7.7.<br />

Figure 7.7<br />

269

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

Saved successfully!

Ooh no, something went wrong!