I have a table with over 8 million rows of lat / long data all currently in
decimal(12,8) format (actually some in float(12,8)).
First question - should I have these all in decimal or float? I can't
think of any reason why I would actually do any math via mysql with this
data. I am just running queries and dumping the reults into a webapp.
Second question - my data is actual distinct rows with a north, east, south
and west lat / long for the boundary of a specific area. I want to search
based on a point lat / long (i.e. WHERE n > lat, s < lat, e > long, w <
long) to find the specific area that the point is located in.
I tried a simple index with my n,e,s & w but it still takes along time to
run such a query i.e. phpmyadmin times out. Any idea on the best structure
for such a query?