Indexing xml Columns

Two levels of indexing are available for xml columns: primary and secondary. Three types of secondary indexing are available, based on the different kinds of XQuery queries that will be performed on the column: PATH for path-based querying, PROPERTY for property bag scenarios, and VALUE for value-based querying.

If you want to create a primary XML index on a table, it must meet a few requirements:

• The table must have a clustered primary key (with fewer than 16 columns in it). The reason is that the primary XML index contains a copy of the primary key for back referencing. It is also required for table partitioning because it ensures that the primary XML index is partitioned in the same manner as the table. The primary ...

Get Microsoft® SQL Server 2008 R2 Unleashed 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.