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.

Chapter 3: Text and XML <strong>Execution</strong> <strong>Plans</strong> for Basic Queries<br />

<br />

<br />

<br />

<br />

Listing 3.12<br />

The information within this element will be familiar to you from the ToolTip window<br />

and Properties sheets from the graphical execution plans. Notice that, unlike text<br />

plans, which just displayed "Estimate<strong>Execution</strong>s=0.001581," the XML plan includes the<br />

estimated number of rebinds and rewinds. This can often give you a more accurate idea<br />

of what occurred within the query, such as how many times the operator executed.<br />

For example, for NodeId="20", the final Clustered Index Seek, associated with the<br />

Nested Loops join in NodeId="0", we see:<br />

<br />

Listing 3.13<br />

Returning to Node 0 at the top of the XML, the next element listed is the OutputList<br />

element with a list of ColumnReference elements, each containing a set of attributes to<br />

describe that column (Listing 3.14).<br />

<br />

<br />

<br />

<br />

132

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

Saved successfully!

Ooh no, something went wrong!