From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #713: Could not make a vector index work even in the simplest scenario
Date: Mon, 11 Nov 2024 23:35:54 +0000
Message-ID: <gh-pgvector-pgvector-713-c2469289695@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-713@github.com>
References: <gh-pgvector-pgvector-713@github.com>
That query compares a single vector with a column (instead of a column with a column). You could try running separate queries for each row in A (or groups of rows with `UNION ALL` - #59) to use the approximate index, then combine the results in-memory to get the top 100.
Edit: Thinking about it more, an index might be able to help the original query. However, the Postgres planner doesn't seem to consider it (even with `enable_seqscan = off`), so this would likely require an upstream change.