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

Commit2452270

Browse files
committed
Improved hnswrescan
1 parentbfb3a45 commit2452270

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎src/hnswscan.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
126126

127127
so= (HnswScanOpaque)palloc(sizeof(HnswScanOpaqueData));
128128
so->typeInfo=HnswGetTypeInfo(index);
129-
so->first= true;
130-
so->v.tids=NULL;
131-
so->discarded=NULL;
132129

133130
/*
134131
* Use a lower max allocation size than default to allow scanning more
@@ -154,13 +151,10 @@ hnswrescan(IndexScanDesc scan, ScanKey keys, int nkeys, ScanKey orderbys, int no
154151
{
155152
HnswScanOpaqueso= (HnswScanOpaque)scan->opaque;
156153

157-
if (so->v.tids!=NULL)
158-
tidhash_reset(so->v.tids);
159-
160-
if (so->discarded!=NULL)
161-
pairingheap_reset(so->discarded);
162-
163154
so->first= true;
155+
/* v and discarded are allocated in tmpCtx */
156+
so->v.tids=NULL;
157+
so->discarded=NULL;
164158
so->tuples=0;
165159
so->previousDistance=-get_float8_infinity();
166160
MemoryContextReset(so->tmpCtx);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp