XML indexes

SQL Server 2005 marked the introduction of the native XML data type and the inclusion of the XQuery language as part of SQL Server. XQuery is a declarative query language that can be parsed, algebrized, and optimized similar to the way that the SQL language can. Although many of the same rules apply to XML and XQuery as apply to relational data, XQuery has some different rules and constructs than SQL. For example, relational sets are unordered, so an ORDER BY clause is required if you want to return rows in order, but XQuery mandates that the results be returned in document order. XML indexes exist to optimize XQuery as SQL indexes exist to optimize SQL queries.

Note

In SQL Server 2012 SP1, Microsoft introduced an entirely different ...

Get Microsoft SQL Server 2012 Internals 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.