problem
When monitoring the recall of a vector query, you sometimes want to disable all approximate indexes to get the ground_truth and monitor recall.
Yet enable_indexscan isn't ideal since it turns off all indexes, causing problems in complex queries that make use of multiple tables/indexes.
solution
Introduce a new guc convention, that if enable_approxscan is set and marked as off, turns off approximate indexes (by setting the cost really high as other enable_* gucs do). This guc wouldn't be defined in pgvector, but pgvector would check if it's set (just by name) and act accordingly.
I propose enable_approxscan as the name but open to other suggestions.
I think this convention would ideally, in time apply to all approximate Postgres indexes, certainly we'd also implement it in pgvectorscale's diskann.
question
Curious about thoughts on whether or not this is a good idea.
problem
When monitoring the recall of a vector query, you sometimes want to disable all approximate indexes to get the ground_truth and monitor recall.
Yet
enable_indexscanisn't ideal since it turns off all indexes, causing problems in complex queries that make use of multiple tables/indexes.solution
Introduce a new guc convention, that if
enable_approxscanis set and marked as off, turns off approximate indexes (by setting the cost really high as other enable_* gucs do). This guc wouldn't be defined in pgvector, but pgvector would check if it's set (just by name) and act accordingly.I propose
enable_approxscanas the name but open to other suggestions.I think this convention would ideally, in time apply to all approximate Postgres indexes, certainly we'd also implement it in pgvectorscale's diskann.
question
Curious about thoughts on whether or not this is a good idea.