Spatial index is slow when trying to find all the points within a range of a geocode.
来源:互联网 发布:windows10软件字体模糊 编辑:程序博客网 时间:2024/05/17 10:53
You might need to use an Index hint (i.e. WITH(INDEX( [INDEX_NAME] ))
Select top 100 ci.Geocode.STDistance(@g), ci.CIOI from CustomerInformation WITH(INDEX(IX_CI_Geocode))ci where ci.Geocode.Filter(@region) = 1 order by ci.Geocode.STDistance(@g) asc
http://stackoverflow.com/questions/6461496/spatial-index-is-slow-when-trying-to-find-all-the-points-within-a-range-of-a-geo
my example
DECLARE
@search_longitude FLOAT='121.78364585795',
@search_latitude FLOAT='31.2351032520358',
@radius Float=100
DECLARE @search_position geography = geography::Point(@search_latitude, @search_longitude, 4326)
--DECLARE @search_position geography = geography::Point(@search_latitude, @search_longitude, 4326).STBuffer(@radius)
SELECT TOP 50 *
FROM Locations l WITH(INDEX(IX_Stores_Location))
WHERE l.Location is not null and l.Location.STDistance(@search_position) <= @radius
--l.Location.Filter(@search_position)=1
- Spatial index is slow when trying to find all the points within a range of a geocode.
- find all the permutation of a string
- A value is trying to be set on a copy of a slice from a DataFrame
- When is a CDATA section necessary within a script tag?
- Ch8.3: find all the subsets of a set
- 问题解决:SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
- Index and length must refer to a location within the string是什么错?
- Index and length must refer to a location within the string是什么错?
- Index and length must refer to a location within the string. Parameter name: length (mscorlib)
- How is jstack being used to find the bottlenect of a java program
- mySQL给空间字段建立索引出现错误All parts of a SPATIAL index must be NOT NULL的解决办法
- Resolution to the record count increasing of the file exported from DB when ‘0A’ is included in it
- The project you are trying to remove is currently deployed to a running application server.解决方案
- Layout inflation is the term used within the context of Android to indicate when an XML layout resou
- Layout inflation is the term used within the context of Android to indicate when an XML layout resou
- the diary of how to get a random word within a file
- You are to find all the two-word compound words in a dictionary. A two-word compound word is a word
- When is a Leak not a Leak? Using Heapshot Analysis to Find Undesirable Memory Growth
- C++ Dll
- XP硬盘安装Ubuntu 10.10双系统图解
- Percona对MySQL标准版本的改进
- JavaEE 各种技术原理图
- 安装Ubuntu 10.10后XP启动项丢失
- Spatial index is slow when trying to find all the points within a range of a geocode.
- ps 进程状态
- 关于用WebView或手机浏览器打开连接问题
- Iphone 开发(一) Mac 初识
- Android 2.3 上Launcher2调试(Eclipse)
- Cocos2d设置横竖屏幕
- printf的两个需要注意的问题:无符号整数和64位整数
- 中英文对照 介绍Play Framework 框架 模块
- c++动态加载dll中的类(用于实现依据字符串类名创建对象)