[thelist] Zip/Postal Code Radius

Howard Cheng howcheng at ix.netcom.com
Thu Dec 19 16:09:01 CST 2002

Assuming you have the zip code field indexed (it's the primary key in my
table), this actually goes pretty quickly. This is what I got out of Query

Airport Index Scan:    0.156572     45%
Cities Index Seek:     0.006408      2%
Inner Join:            0.093754     27% (including the WHERE computation)
Compute Scalar:        0.000415      0%
Sort:                  0.089138     26%
TOTAL                  0.350022    100%

So all of that in less than half a second. And our SQL Server is our
development one, so it's not even on a really great machine.

The Cities table has 42,242 rows. The Airports table has 13,828 rows.

At 03:31 PM 12/19/2002 -0500, Joshua Olson wrote:
>While not REALLY being hard (like you explained), I can't imagine that the
>query you provided runs very quickly due to all the math involved in the
>conditional.  :-)  But, you have done a great service by actually providing
>the query and the equation... thank you.  What sort of speed results did you
>get with it?

Howard Cheng
howcheng at ix dot netcom dot com
AIM: bennyphoebe
ICQ: 47319315

More information about the thelist mailing list