Build1 publisher2 min readPublished
pgvector's cost-based planner picks approximate scans where exact scans hit perfect recall
A three-engine evaluation of filtered vector search on a purpose-built relational dataset credits Milvus's hybrid approximate/exact execution with stable recall, and puts pgvector's plan choice ahead of its index choice as the thing that loses it.
The Engineer · Build desk

What happened
- A new arXiv paper evaluates generic filtering strategies inside FAISS, Milvus and pgvector, and sets out a taxonomy of those strategies that the authors say the literature has been missing.
- The authors built MoReVec, a two-table relational dataset with 768-dimensional text embeddings and a rich metadata schema, to test filtered search against a realistic relational shape.
- They report that Milvus holds recall stable across filtered queries through hybrid approximate/exact execution.
- For low-selectivity queries the partition-based IVFFlat index beat the graph-based HNSW, the third of the three findings the authors summarise in their abstract.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- decision Tuning a filtered retrieval path on Postgres starts with the plan the optimizer chose, since the paper's own remedy is index selection plus optimizer configuration.
- cost A pgvector deployment that lets the planner take the approximate scan pays in missing neighbours and gets no latency saving in return.
- constraint The specialised filtered-ANN algorithms need an index tuned to specific attributes or workloads, so a schema-agnostic deployment is left with generic pre-filtering and post-filtering.
- contradiction The authors summarise their work as engine adaptations overriding raw index performance, yet one of the three findings is a plain index-choice rule, and both readings need the underlying selectivity numbers to be settled.
pgvector's result sits in the cost model. The optimizer prices an approximate index scan against an exact sequential scan and, the authors report, frequently picks the approximate one even where the sequential scan would have returned every true neighbour at comparable latency [6]. Recall is spent and no latency comes back [15]. The paper's remedy is not a new index type: it synthesises guidelines for selecting index types and for configuring query optimizers on hybrid search workloads [10].
I would expect the Milvus finding to be the same effect from the other side. An engine that can fall back to exact evaluation over the rows that survive a predicate has a floor under its recall, and the abstract attributes Milvus's recall stability to exactly that hybrid approximate/exact execution [5].
Before carrying either result into your own cluster, look at what the filters correlate with. The authors propose Global-Local Selectivity, a correlation metric for the relationship between filters and query vectors [4]. That relationship decides whether a predicate thins the corpus roughly uniformly or removes the region the query vector points at. Their production examples are ordinary ones: a medical RAG query for similar symptoms restricted to an age range, a legal search restricted to a jurisdiction [18]. IVFFlat beating HNSW on low-selectivity queries [7] transfers if your predicates sit on your embedding space the way MoReVec's do, and the paper hands you the metric to check that instead of asking you to take the ordering on faith.
There is also the definitional problem the authors name in their own motivation. They write that the literature lacks a unified taxonomy for these strategies, which has produced ambiguous definitions and inconsistent implementations across systems [13]. Two engines can both advertise pre-filtering and do different work behind the word. That matters for anyone comparing vendors on a slide, because the generic strategies are what schema-agnostic engines are left with [12].
The supplied abstract and introduction do not include per-engine latency or recall figures, and do not say whether low selectivity means few rows surviving the filter or many. The authors extended ANN-Benchmarks to cover filtered vector search and released it [9], so the pgvector plan finding is checkable against another dataset. Until someone does that, it is one group's measurement on the two-table dataset they built for it [3].
What to watch
- Whether an independent group reproduces the pgvector plan finding on a different corpus and filter distribution.
- Whether pgvector's cost model changes to account for recall, or the guidance stays at optimizer configuration.
- Whether the GLS correlation metric gets adopted by other filtered-search benchmarks, which would make cross-paper results comparable.