sys.selective_xml_index_paths (Transact-SQL)

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2012)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Available beginning in SQL Server 2012 Service Pack 1, each row in sys.selective_xml_index_paths represents one promoted path for particular selective xml index.

If you create a selective xml index on xmlcol of table T using following statement,

FOR ( path1 = '/a/b/c' AS XQUERY 'xs:string',  
      path2 = '/a/b/d' AS XQUERY 'xs:double'  

There will be two new rows in sys.selective_xml_index_paths corresponding to the index sxi1.

Column name Data type Description
object_id int ID of table with XML column.
index_id int Unique id of the selective xml index.
path_id int Promoted XML path id.
path nvarchar(4000) Promoted path. For example, '/a/b/c/d/e'.
name sysname Path name.
path_type tinyint 0 = XQUERY

1 = SQL
path_type_desc sysname Based on path_type value 'XQUERY' or 'SQL'.
xml_component_id int Unique ID of the XML schema component in the database.
xquery_type_description nvarchar(4000) Name of the specified xsd type.
is_xquery_type_inferred bit 1 = type is inferred.
xquery_max_length smallint Max length (in character of xsd type).
is_xquery_max_length_inferred bit 1 = maximum length is inferred.
is_node bit 0 = node() hint not present.

1 = node() optimization hint applied.
system_type_id tinyint ID of the system type of the column.
user_type_id tinyint ID of the user type of the column.
max_length smallint Max Length (in bytes) of the type.

-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.
precision tinyint Maximum precision of the type if it is numeric-based. Otherwise 0.
scale tinyint Maximum scale of the type if it is numeric-based. Otherwise, 0.
collation_name sysname Name of the collation of the type if it is character-based. Otherwise, NULL.
is_singleton bit 0 = SINGLETON hint not present.

1 = SINGLETON optimization hint applied.


The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.

See Also

Catalog Views (Transact-SQL)
XML Schemas (XML Type System) Catalog Views (Transact-SQL)