Here is the question I have for all
I already have an existing system that does the “Near By Zipcodes” search.
The purpose of this post is to see if I can optimize the process.
Currently, I have about 43k zipcode records.
The way my current algorithm works is I select 1 record and do a full table scan of 43k records.
Is there a way to only take a subset (lat range, long range) and do the calculation that way?
You can get lat/lon for the centroids of all the zip codes from google, or geocoder.us (or wherever you get your geo data). Use them in your where clause as a rough guide to narrow your search.