Re: KNNGiST for knn-search

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: KNNGiST for knn-search
Date: 2009-11-26 16:37:13
Message-ID: 4B0EAEB9.8050007@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2009-11-26 16:42:26 Re: KNNGiST for knn-search
Previous Message Chris Browne 2009-11-26 16:36:01 Re: cvs chapters in our docs