From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #678: Iterative index scans
Date: Wed, 25 Sep 2024 13:29:31 +0000
Message-ID: <gh-pgvector-pgvector-678-c2374093125@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-678@github.com>
References: <gh-pgvector-pgvector-678@github.com>
> > @ankane I'm unlikely to dive into this tonight, but from a quick [doc read on index scanning](https://www.postgresql.org/docs/current/index-scanning.html) the scan keys should be available in `amrescan`. I see that `hnswrescan` is checking that, so my very quick thought is that the optimizer may not be pushing the scan keys down to this particular path. Curious what `nkeys` has?
>
> @jkatz nkeys is more than zero if 1) index build with multiple columns or expressions 2) these columns or expressions are used in WHERE clause (and operator is described in class operator definition) - the number of these operators in WHERE equals to nkeys. The first condition already is not true for pgvector, it is not defined as multicolumn index and cannot accept other columns in CREATE INDEX command.
@VladlenPopolitov The first sentence was:
> I did benchmark yesterday, all approaches shows relatively same performance, though hnsw-streaming is slightly better.
and given it specifically discussed performance, my follow-up was around getting more data around the general performance, with some suggestions. I would still be curious in these results.
Thank you for the explanation of how scan keys are pushed down to the index for consideration.