mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-23 04:20:56 +08:00
Improved batch size flexibility [skip ci]
This commit is contained in:
@@ -332,11 +332,15 @@ hnswgetbatch(IndexScanDesc scan, IndexScanBatch priorbatch, ScanDirection dir)
|
||||
batch->items[nitems].indexOffset = -1;
|
||||
batch->items[nitems].tupleOffset = 0;
|
||||
nitems++;
|
||||
|
||||
/* Keep batch size flexible */
|
||||
if (nitems == scan->maxitemsbatch)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Needed for strict iterative scans */
|
||||
if (nitems == 0)
|
||||
break;
|
||||
continue;
|
||||
|
||||
MemoryContextSwitchTo(oldCtx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user