Re: [PERFORM] optimizing a geo_distance() proximity query (example and benchmark)

2007-02-06 Thread Merlin Moncure
On 2/6/07, Mark Stosberg <[EMAIL PROTECTED]> wrote: It's also notable that the units used are meters, not miles like geo_distance(). That's what the magic number of "16093.44" is-- 10 miles converted to meters. When I benchmarked this query against the old geo_distance() variation, it was about

Re: [PERFORM] optimizing a geo_distance() proximity query (example and benchmark)

2007-02-05 Thread Bruno Wolff III
On Mon, Feb 05, 2007 at 18:01:05 -0500, Mark Stosberg <[EMAIL PROTECTED]> wrote: > > It's also notable that the units used are meters, not miles like > geo_distance(). That's what the magic number of "16093.44" is-- 10 miles > converted to meters. You can change the earth() function in earthdis

Re: [PERFORM] optimizing a geo_distance() proximity query (example and benchmark)

2007-02-05 Thread Mark Stosberg
Merlin Moncure wrote: > On 2/5/07, Mark Stosberg <[EMAIL PROTECTED]> wrote: >> Bruno Wolff III wrote: >> > On Sat, Feb 03, 2007 at 14:00:26 -0500, >> > Mark Stosberg <[EMAIL PROTECTED]> wrote: >> >> I'm using geo_distance() from contrib/earthdistance would like to >> find a >> >> way to spend up

Re: [PERFORM] optimizing a geo_distance() proximity query

2007-02-05 Thread Bruno Wolff III
On Mon, Feb 05, 2007 at 14:47:25 -0500, Mark Stosberg <[EMAIL PROTECTED]> wrote: > > This is also interesting. Is this approach practical if I want to index > what's near each of about 40,000 US zipcodes, or the approach mostly > useful if you there are just a small number of fixed points to add

Re: [PERFORM] optimizing a geo_distance() proximity query

2007-02-05 Thread Merlin Moncure
On 2/5/07, Mark Stosberg <[EMAIL PROTECTED]> wrote: Bruno Wolff III wrote: > On Sat, Feb 03, 2007 at 14:00:26 -0500, > Mark Stosberg <[EMAIL PROTECTED]> wrote: >> I'm using geo_distance() from contrib/earthdistance would like to find a >> way to spend up the geo distance calculation if possible

Re: [PERFORM] optimizing a geo_distance() proximity query

2007-02-05 Thread Mark Stosberg
Bruno Wolff III wrote: > On Sat, Feb 03, 2007 at 14:00:26 -0500, > Mark Stosberg <[EMAIL PROTECTED]> wrote: >> I'm using geo_distance() from contrib/earthdistance would like to find a >> way to spend up the geo distance calculation if possible. This is for a >> proximity search: "Show me adoptabl

Re: [PERFORM] optimizing a geo_distance() proximity query

2007-02-03 Thread Bruno Wolff III
On Sat, Feb 03, 2007 at 14:00:26 -0500, Mark Stosberg <[EMAIL PROTECTED]> wrote: > > I'm using geo_distance() from contrib/earthdistance would like to find a > way to spend up the geo distance calculation if possible. This is for a > proximity search: "Show me adoptable pets within 250 miles of

Re: [PERFORM] optimizing a geo_distance() proximity query

2007-02-03 Thread Oleg Bartunov
Mark, in astronomy we extensively use such kind of query, which we call radial search or conesearch. There are several algorithms which perform efficiently such query using spherical coordinates. Specifically, we use our Q3C algorithm, see http://www.sai.msu.su/~megera/wiki/SkyPixelization for

[PERFORM] optimizing a geo_distance() proximity query

2007-02-03 Thread Mark Stosberg
Hello, I'm using geo_distance() from contrib/earthdistance would like to find a way to spend up the geo distance calculation if possible. This is for a proximity search: "Show me adoptable pets within 250 miles of this zipcode". I'm researched a number of approaches to this, but none seem as wor