Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting from distance for geography coordinates
Message
De
23/11/2011 08:52:54
 
 
À
23/11/2011 08:43:28
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01529492
Message ID:
01529664
Vues:
12
>>Ok, Thanks for the 2008 version
>
>If I recall from the metrix I obtained when comparing the two environments last year, there was as significant gain of performance when using the 2008 approach. When I ran in against 100000 records, the result was still instant. I really do not know how they do that internally, but they certainly did a good job.


I suppose ...

They hold some kind of index on the latitude and longitude
They then first select a subset (the rectangle form my previous message), so they don't have to calculate the distance for every record
And finally calculate the distance (aka radius) for each record in the subset

Finally, they may store the sin or cos along with the data (longitude and latitude) - so they don't have to recalculate those values every time
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform