Switched to heap for nearest lists for performance

This commit is contained in:
Andrew Kane
2022-02-13 02:59:27 -08:00
parent 4f2c937a1f
commit ce72ca8620
2 changed files with 42 additions and 16 deletions

View File

@@ -165,6 +165,7 @@ typedef IvfflatListData * IvfflatList;
typedef struct IvfflatScanList
{
pairingheap_node ph_node; /* must come first */
BlockNumber startPage;
double distance;
} IvfflatScanList;
@@ -186,6 +187,8 @@ typedef struct IvfflatScanOpaqueData
FmgrInfo *normprocinfo;
Oid collation;
/* Lists */
pairingheap *listQueue;
IvfflatScanList lists[FLEXIBLE_ARRAY_MEMBER]; /* must come last */
} IvfflatScanOpaqueData;