Added iterative search for IVFFlat [skip ci]

This commit is contained in:
Andrew Kane
2024-10-10 18:12:27 -07:00
parent 48fe70c219
commit c91ed7b2c3
6 changed files with 258 additions and 27 deletions

View File

@@ -80,6 +80,14 @@
/* Variables */
extern int ivfflat_probes;
extern int ivfflat_iterative_search;
extern int ivfflat_iterative_search_max_probes;
typedef enum IvfflatIterativeSearchType
{
IVFFLAT_ITERATIVE_SEARCH_OFF,
IVFFLAT_ITERATIVE_SEARCH_RELAXED
} IvfflatIterativeSearchType;
typedef struct VectorArrayData
{
@@ -248,8 +256,10 @@ typedef struct IvfflatScanOpaqueData
{
const IvfflatTypeInfo *typeInfo;
int probes;
int maxProbes;
int dimensions;
bool first;
Datum value;
/* Sorting */
Tuplesortstate *sortstate;
@@ -266,6 +276,8 @@ typedef struct IvfflatScanOpaqueData
/* Lists */
pairingheap *listQueue;
BlockNumber *listPages;
int listIndex;
IvfflatScanList lists[FLEXIBLE_ARRAY_MEMBER]; /* must come last */
} IvfflatScanOpaqueData;