sqlgeography - SQL, How to improve the speed of STGeomFromText and STDistance in this query? -


i trying geo distance using query seems slow (taking 10 seconds on table of 15k records). there way improve this?

select count(contact_id) matcher_contact (geography::stgeomfromtext('point(-71.4536835 42.3240042)', 4326).stdistance(geography) <= 25000) 

and here image of execution plan. seems of time spent on filtering in clause

enter image description here

additional info:

matcher_contact has 15k records

geography 1 of columns

here examples of values in geography column:

0xe6100000010c5b4645f707b14440e0dae44b036252c0 0xe6100000010c4e93beb5b8854440885ae4e83b8552c0 0xe6100000010cb5368dedb51045400aab67f71a0554c0 0xe6100000010ca3a5e14a2cbe454008da2e7ee49f51c0


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -