From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #424: Update cost estimation to not use index when expected tuples is too low
Date: Fri, 11 Oct 2024 08:06:46 +0000
Message-ID: <gh-pgvector-pgvector-424-c2406832433@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-424@github.com>
References: <gh-pgvector-pgvector-424@github.com>
The updated cost functions + iterative search should help a lot with this, so will close this out. Thanks for the feedback.
For HNSW, it may still choose the index in cases where there will be too few results since iterative search will stop when it exceeds `work_mem` (which happens after ~20k tuples with the default `work_mem`). It seems like there's not really a great way to tell the planner the index has a cutoff (since none of the built-in index AMs need it).