Re: KNNGiST for knn-search - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: KNNGiST for knn-search
Date
Msg-id 4B0EAEB9.8050007@sigaev.ru
Whole thread Raw
In response to Re: KNNGiST for knn-search  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: KNNGiST for knn-search
List 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@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: KNNGiST for knn-search (WIP)
Next
From: Teodor Sigaev
Date:
Subject: Re: KNNGiST for knn-search