Re: application of KNN code to US zipcode searches?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Mark Stosberg <mark(at)summersault(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: application of KNN code to US zipcode searches?
Date: 2011-02-17 19:13:05
Message-ID: 12992.1297969985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> The existing opclasses only support distance-to-a-point, but I believe
> the KNN gist code is flexible enough that it could be used for distance
> to the edge of a shape as well. Someone just needs to write the
> operators and support functions.

The distance has to be exactly computable from the index entry, so you'd
need to store the whole shape in the index, not just a bounding box.
Not sure how practical that will be for complex shapes.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2011-02-17 19:17:17 Re: application of KNN code to US zipcode searches?
Previous Message Mark Stosberg 2011-02-17 16:41:51 Re: application of KNN code to US zipcode searches?