Re: KNN-GiST with recheck

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: KNN-GiST with recheck
Date: 2015-05-14 10:43:22
Message-ID: CAPpHfdvDk4=VRPUGvLL0rwVTys247shUeckcURQ42Y3-2tidAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 13, 2015 at 10:17 PM, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
wrote:

> One quick comment:
>>
>> It would be good to avoid the extra comparisons of the distances, when
>> the index doesn't return any lossy items. As the patch stands, it adds one
>> extra copyDistances() call and a cmp_distances() call for each tuple (in a
>> knn-search), even if there are no lossy tuples.
>
>
> I will fix it until Friday.
>

Attached patch is rebased against current master. Extra extra
copyDistances() call and a cmp_distances() call for each tuple are avoided
in the case of no lossy tuples.

------
With best regards,
Alexander Korotkov.

Attachment Content-Type Size
knn-gist-recheck-9.patch application/octet-stream 44.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-14 12:25:10 broken documentation: BackgroundWorkerInitializeConnection(NULL, NULL);
Previous Message Etsuro Fujita 2015-05-14 10:37:58 Re: Missing importing option of postgres_fdw