sp_help_spatial_geography_index_xml (Transact-SQL)
Returns the name and value for a specified set of properties about a geography spatial index. You can choose to return a core set of properties or all properties of the index.
Results are returned in an XML fragment that displays the name and value of the properties selected.
Transact-SQL Syntax Conventions
Syntax
sp_help_spatial_geography_index_xml [ @tabname =] 'tabname'
[ , [ @indexname = ] 'indexname' ]
[ , [ @verboseoutput = ] 'verboseoutput' ]
[ , [ @query_sample = ] 'query_sample' ]
[ ,.[ @xml_output = ] 'xml_output' ]
Arguments
See Arguments and Properties of Spatial Index Stored Procedures.
Properties
See Arguments and Properties of Spatial Index Stored Procedures.
Permissions
User must be assigned a PUBLIC role to access the procedure. Requires READ ACCESS permission on the server and the object.
Remarks
Properties containing NULL values are not included in the return set.
Example
The following example uses sp_help_spatial_geography_index_xml to investigate the spatial index SIndx_SpatialTable_geography_col2 defined on table geography_col for the given query sample in @qs. This example returns the core properties of the specified index in an XML fragment that displays the name and value of the properties selected.
An XQuery is then run on the result set, returning a specific property.
declare @qs geography
='POLYGON((-90.0 -180, -90 180.0, 90 180.0, 90 -180, -90 -180.0))';
declare @x xml;
exec sp_help_spatial_geography_index_xml 'geography_col', 'SIndx_SpatialTable_geography_col2', 0, @qs, @x output;
select @x.value('(/Primary_Filter_Efficiency/text())[1]', 'float');
Similar to sp_help_spatial_geography_index, this stored procedure provides simpler programmatic access to the properties of a geography spatial index and reports the result set in XML.
The bounding box of a geography is the whole earth.
See Also
Reference
sp_help_spatial_geography_index