0
votes

Specifically for the common real world query type with the following inputs:

  • Latitude and longitude coordinates
  • Radius in meters

If I want to return all the stored points within the radius of the input coordinate, how fast can I expect this to be using mySQL spatial indexing and querying?

How would this query time vary running on ten thousand, one hundred thousand, and one million stored data points?

Thanks

1
On a laptop from the 1990s or a 256-core monster with a terabyte of RAM?ceejayoz
If you "don't like" the answer, what is your "Plan B"?Rick James

1 Answers

0
votes

Erm, very fast? In theory, its marginally slower than a linear range lookup using a btree index but you're unlikely to notice the difference (of course functionally these are very different and not interchangeable). The time to retrieve a single row based on a geospatial index should increase in the order log(n).