pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: rsomani95 (@rsomani95) <noreply+rsomani95@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #721: HNSW index bypassed when LIMIT or filter selectivity exceeds threshold
Date: Thu, 27 Feb 2025 20:24:19 +0000
Message-ID: <gh-pgvector-pgvector-721-c2689035998@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-721@github.com>
References: <gh-pgvector-pgvector-721@github.com>

The `pg_hint_plan` suggestion sent me down a bit of a rabbit hole. While it did force postgres to use the index, the quality of the results was quite inferior to brute force search (which was almost never the case when postgres decided to use the index by itself). I figured that part of the problem was that my filtering params were shaving off like 90% of the graph (not an exact number, but you get the point), so there really wasn't much space left to traverse within the HNSW graph. I ended up building a more tightly scoped index with some of the filtering params built in. 

view thread (6+ messages)

Message-ID: <gh-pgvector-pgvector-721-c2689035998@github.com>
Permalink:  ../gh-pgvector-pgvector-721-c2689035998@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox