From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Mark Stosberg <mark@summersault.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: application of KNN code to US zipcode searches?
Date: Thu, 17 Feb 2011 14:13:05 -0500
Message-ID: <12992.1297969985@sss.pgh.pa.us> (raw)
In-Reply-To: <4D5D4FB9.8020709@enterprisedb.com>
References: <ijjc1o$vgu$1@dough.gmane.org>
<4D5CE118020000250003AB83@gw.wicourts.gov>
<ijjecs$e8c$1@dough.gmane.org>
<4D5D4FB9.8020709@enterprisedb.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, heikki.linnakangas@enterprisedb.com, mark@summersault.com
Subject: Re: application of KNN code to US zipcode searches?
In-Reply-To: <12992.1297969985@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox