Re: application of KNN code to US zipcode searches? - Mailing list pgsql-performance

From Tom Lane
Subject Re: application of KNN code to US zipcode searches?
Date
Msg-id 12992.1297969985@sss.pgh.pa.us
Whole thread Raw
In response to Re: application of KNN code to US zipcode searches?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-performance
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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

pgsql-performance by date:

Previous
From: Mark Stosberg
Date:
Subject: Re: application of KNN code to US zipcode searches?
Next
From: Tom Lane
Date:
Subject: Re: application of KNN code to US zipcode searches?