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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

The number of operators involved does make this plan more complicated. It's worth<br />

noting that the query without an index ran in about 2.2 seconds and in only 87ms with<br />

a spatial index.<br />

While these functions are complex and require a lot more knowledge to implement, you<br />

can see that the execution plans still use the same tools to understand these operations.<br />

That's the point I'm trying to get across here, not specifically how spatial indexing works<br />

in all regards.<br />

Summary<br />

The introduction of these complex data types, XML, Hierarchical and Spatial, radically<br />

expands the sort of data that we can store in <strong>SQL</strong> <strong>Server</strong> and the sort of operations that<br />

we can perform on this data.<br />

XML provides mechanisms for storage and retrieval of XML data and, as we covered<br />

earlier in the book, with XQuery we can retrieve information from execution plans<br />

directly from the procedure cache. The other data types don't have as profound an impact<br />

on what you should expect to see in execution plans, but their use does introduce some<br />

additional issues and concerns that you need to learn to keep an eye out for within<br />

execution plans. However, as you can see, generating and interpreting the plan still uses<br />

the same mechanisms and methods we've been working with throughout the book.<br />

286

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

Saved successfully!

Ooh no, something went wrong!