mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-29 17:21:16 +08:00
Fixed index scan count
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "access/relscan.h"
|
||||
#include "ivfflat.h"
|
||||
#include "miscadmin.h"
|
||||
#include "pgstat.h"
|
||||
#include "storage/bufmgr.h"
|
||||
|
||||
#include "catalog/pg_operator_d.h"
|
||||
@@ -267,6 +268,9 @@ ivfflatgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
{
|
||||
Datum value;
|
||||
|
||||
/* Count index scan for stats */
|
||||
pgstat_count_index_scan(scan->indexRelation);
|
||||
|
||||
/* Safety check */
|
||||
if (scan->orderByData == NULL)
|
||||
elog(ERROR, "cannot scan ivfflat index without order");
|
||||
|
||||
Reference in New Issue
Block a user