From: Teodor Sigaev <teodor@sigaev.ru>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: KNNGiST for knn-search
Date: Thu, 26 Nov 2009 19:37:13 +0300
Message-ID: <4B0EAEB9.8050007@sigaev.ru> (raw)
In-Reply-To: <1259115190.27757.11194.camel@ebony>
References: <4B0AC9E1.5050509@sigaev.ru>
<1259115190.27757.11194.camel@ebony>
> explain select col1 from s order by abs(col1 - 5) limit 10;
>
> is the one-dimensional equivalent of the type of query you're proposing
Exactly, it's already done in next version of patch :)
> and that doesn't work either until you put an index on abs(col1 - 5),
> then it just works, but only for k = 5.
BTW, it's possible to add this feature to plain btree by changing traversal
algorithm, but I'm fill enough power to do it.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
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-hackers@postgresql.org
Cc: teodor@sigaev.ru, simon@2ndQuadrant.com
Subject: Re: KNNGiST for knn-search
In-Reply-To: <4B0EAEB9.8050007@sigaev.ru>
* 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