so many solutions, so little time!

I like how you're limiting by latitude only and using the radius as well.

Doing that actually lowered my execution time to 94ms ...

 =)

On 2/6/07, Jim Wright <[EMAIL PROTECTED]> wrote:
>
> Russ wrote:
> > No, I'm referring to:
> >
> >
> http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268818
> >
>
> That one is pretty quick here...
> SELECT b.* FROM tblzipcodes a CROSS JOIN tmpzipcodes b
> WHERE dbo.getDistance(a.latitude,a.longitude,b.latitude,b.longitude) <
> 10 AND a.zip = '27614'
>
> Took 1412 ms.
>
> I limited the latitude side of things with...
>
> SELECT b.* FROM tmpzipcodes a CROSS JOIN tmpzipcodes b
> WHERE a.zip = '27614'
> AND b.latitude < a.latitude + (10*.014457)
> AND b.latitude > a.latitude - (10*.014457)
> AND dbo.getDistance(a.latitude,a.longitude,b.latitude,b.longitude) < 10
>
> which only took 170ms
>
> I think that .014457 is right...basically 1 degree/69.172 miles.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268871
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to