From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #1032: Planner rejects HNSW for `ORDER BY embedding <=> $q LIMIT k` with an `= ANY(...)` equality filter — estimated cost ~79x too high for a path that is 14.5x faster (PG 17.11, pgvector 0.8.6)
Date: Sun, 27 Sep 2026 21:43:29 +0000
Message-ID: <gh-pgvector-pgvector-1032-c5860089716@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-1032@github.com>
References: <gh-pgvector-pgvector-1032@github.com>
Hi @moreirawebmaster, I don't think there's anything for pgvector to do here. The planner won't have statistics for `vector_norm(embedding) > 0` and there are existing ways to get the planner to use the index.