# Not using SQL Server spatial index

**URL:** <https://community.thinkgeo.com/t/not-using-sql-server-spatial-index/7188>\
**Category:** Services\
**Created:** [January 20, 2016, 1:35pm UTC](https://community.thinkgeo.com/t/not-using-sql-server-spatial-index/7188 "2016-01-20T13:35:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Peter](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/peter/32/19042_2.png) [@Peter](https://community.thinkgeo.com/u/Peter)\
**Post date:** [January 22, 2016, 5:11am UTC](https://community.thinkgeo.com/t/not-using-sql-server-spatial-index/7188/4 "2016-01-22T05:11:48Z")

</div>

Hi&nbsp;John,  
  
  
  
We&nbsp;did&nbsp;some&nbsp;changes&nbsp;from&nbsp;6.0&nbsp;to&nbsp;9.0.&nbsp;In&nbsp;MsSql&nbsp;Server&nbsp;2008&nbsp;only&nbsp;intersects,&nbsp;disjoint,&nbsp;topologicalequal&nbsp;are&nbsp;available&nbsp;for&nbsp;geography.&nbsp;&nbsp;The&nbsp;code&nbsp;

> `Dim sectionFeatures As Collection(Of Feature)`  
> `Dim sectionColumns As String() = {"SECTION", "TOWNSHIP"}`  
> `sectionFeatures = sectionLayer.QueryTools.GetFeaturesContaining(inPoint, sectionColumns)`

  
will&nbsp;generate&nbsp;the&nbsp;different&nbsp;SQL&nbsp;statement&nbsp;between&nbsp;6.0&nbsp;and&nbsp;9.0&nbsp;as&nbsp;you&nbsp;attached&nbsp;before.&nbsp;In&nbsp;6.0&nbsp;the&nbsp;logical&nbsp;operation&nbsp;is&nbsp; **STIntersects&nbsp;** but&nbsp;it’s&nbsp;SWithin&nbsp;in&nbsp;9.0.&nbsp;Please&nbsp;call&nbsp;the&nbsp;**sectionLayer.QueryTools.GetFeaturesIntersecting(inPoint,&nbsp;sectionColumns)&nbsp;**method&nbsp;in&nbsp;9.0&nbsp;to&nbsp;get&nbsp;the&nbsp;same&nbsp;result&nbsp;as&nbsp;call&nbsp;the&nbsp;**sectionLayer.QueryTools.GetFeaturesContaining(inPoint,&nbsp;sectionColumns)**&nbsp;method&nbsp;in&nbsp;6.0.  
  
  
  
Thanks,  
  
Peter

---

_[View the full topic](https://community.thinkgeo.com/t/not-using-sql-server-spatial-index/7188)._
