Re: haversine formula with postgreSQL

From: Scott Bailey <artacus(at)comcast(dot)net>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: haversine formula with postgreSQL
Date: 2009-09-18 21:50:33
Message-ID: 4AB400A9.4090107@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> And I think that might work for you. The performance is going to be
> miserable for large stat sets, because it's going to scan the whole
> aaafacilities table every time and recompute every distance, but as an
> example goes it's probably acceptable.

Something I did when implementing haversine in Oracle was first
calculate a bounding box for lat/lon and only calculate the distance for
cities w/in the bounding box.

Scott

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vikram 2009-09-18 22:21:02 Re: PostgreSQL on Windows Server 2003 for Moodle
Previous Message Nick 2009-09-18 21:31:29 Return 30% of results?