Re: KNN-GiST with recheck - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: KNN-GiST with recheck
Date
Msg-id CAPpHfdvDk4=VRPUGvLL0rwVTys247shUeckcURQ42Y3-2tidAg@mail.gmail.com
Whole thread Raw
In response to Re: KNN-GiST with recheck  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: KNN-GiST with recheck  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Wed, May 13, 2015 at 10:17 PM, Alexander Korotkov <aekorotkov@gmail.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

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Missing importing option of postgres_fdw
Next
From: Pavel Stehule
Date:
Subject: broken documentation: BackgroundWorkerInitializeConnection(NULL, NULL);