From: varadfromeast (@varadfromeast) <noreply+varadfromeast@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #1001: Feedback on hypothetical pgvector indexes
Date: Fri, 24 Jul 2026 21:18:12 +0000
Message-ID: <gh-pgvector-pgvector-1001@github.com> (raw)
Hi @ankane — I built a proof of concept for hypothetical pgvector indexes, inspired by HypoPG:
[https://github.com/varadfromeast/pgvector_hypo]
It lets users test whether PostgreSQL would choose an IVFFlat index in EXPLAIN without physically building one. The definition stays in session memory and is never available to normal execution or EXPLAIN ANALYZE.
Because pgvector’s cost function reads lists from the physical index, the prototype currently mirrors pgvector’s IVFFlat page and cost calculations.
I tested it with real SIFT, GloVe, and Last.fm vector datasets. Across 324 combinations of distance type, lists, probes, filters, and limits, the hypothetical and physical indexes had zero planner-choice mismatches. Public CI also passes against pgvector 0.8.0 and 0.8.5.
Before adding HNSW or more PostgreSQL versions, I’d appreciate your advice:
1. Should this remain a separate extension with mirrored cost models?
2. Would pgvector be open to making its cost functions work with hypothetical indexes, allowing HypoPG-style tools to use them?
3. Is this not worth pursuing?
My main concern with a separate extension is keeping its cost model synchronized with pgvector. I’d prefer to align with your direction before taking it further.
Thanks for taking a look !