Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd17b6df

Browse files
committed
Fix knn-GiST queue comparison function to return heap tuples first.
The part of the comparison function that was supposed to keep heap tuplesahead of index items was backwards. It would not lead to incorrect results,but it is more efficient to return heap tuples first, before scanning moreindex pages, when both have the same distance.Alexander Korotkov
1 parent2e105de commitd17b6df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/access/gist/gistscan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ pairingheap_GISTSearchItem_cmp(const pairingheap_node *a, const pairingheap_node
4141

4242
/* Heap items go before inner pages, to ensure a depth-first search */
4343
if (GISTSearchItemIsHeap(*sa)&& !GISTSearchItemIsHeap(*sb))
44-
return-1;
45-
if (!GISTSearchItemIsHeap(*sa)&&GISTSearchItemIsHeap(*sb))
4644
return1;
45+
if (!GISTSearchItemIsHeap(*sa)&&GISTSearchItemIsHeap(*sb))
46+
return-1;
4747

4848
return0;
4949
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp