infodigger
asked on
mySQL and spatial data. How to search?
Hello,
I have a huge table of millions of records with id, lat, long.
I am using the havershine formula to search and find records that are near a certain lat,long combination however this takes a lot of time. I have an index on both fields (lat,long) but doesn't seem to do the work.
I have read that I should use partitioning but I also know that mySQL has introduced some spatial classes.
Any ideas on which way is the most effective to do this? Also any example would be highly appreciated!
Thanks a lot!
I have a huge table of millions of records with id, lat, long.
I am using the havershine formula to search and find records that are near a certain lat,long combination however this takes a lot of time. I have an index on both fields (lat,long) but doesn't seem to do the work.
I have read that I should use partitioning but I also know that mySQL has introduced some spatial classes.
Any ideas on which way is the most effective to do this? Also any example would be highly appreciated!
Thanks a lot!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.