Fix knn-GiST queue comparison function to return heap tuples first.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: d17b6df239e6eebf288969e931cdbe8076d1fe12
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2015-02-17T20:33:38Z
Releases: 9.5.0
Fix knn-GiST queue comparison function to return heap tuples first.

The part of the comparison function that was supposed to keep heap tuples
ahead of index items was backwards. It would not lead to incorrect results,
but it is more efficient to return heap tuples first, before scanning more
index pages, when both have the same distance.

Alexander Korotkov

Files

PathChange+/−
src/backend/access/gist/gistscan.c modified +2 −2