[thelist] Best Practices for building a zip/postal code based dealer locator

Joshua Olson joshua at alphashop.net
Fri Sep 28 07:59:24 CDT 2001


:  ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
:  > not recommended.
:  ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
:
: why?  it's certainly far more accurate than a wildcard search.  in fact,
: there's only one other way that's more accurate and that's to do it via
: driving directions from address a to address b.  isn't the point of a
: dealer locator to give the user an indication of proximity to a given
point
: (zip code)?

It is processor intensive as I know you know.  If the indexes are not
correct then the queries are quite taxing.  On a high volume site, an
inefficient lookup could have profound impact on server performance.  What I
just said is not exactly profound, but since indexing is not a beginner task
it is easier to mess up.  BTW, have you tested this on an Access DB?  I'd
reckon it does not perform too well on a floating point lookup.

I suppose there are some things you could do to speed up the lookup such as
multiply the coordinates by 1000 and then drop the decimal point so that you
are comparing integer numerics instead of floating points.  interesting
idea...

But, I do remember your email where you described some of the shortfalls of
using the 3-and-4-digits-of-the-postal-code method.  Very interesting
results.  I will keep those in mind next time I am asked to code a proximity
search.

-joshua





More information about the thelist mailing list