From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #1058: Improved performance of IVFFlat index scans
Date: Wed, 18 Nov 2026 10:34:49 +0000
Message-ID: <gh-pgvector-pgvector-1058-c6975982075@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-1058@github.com>
References: <gh-pgvector-pgvector-1058@github.com>
A few related follow-up improvements (just fyi):
1. `sortstate` is only initialized when needed
2. a message is reported at the `DEBUG1` level when the scan spills to disk (to help users tune)
3. there's a [branch](https://github.com/pgvector/pgvector/compare/ivfflat-scan-mem-multiplier) for an `ivfflat.scan_mem_multipler` option
I also suspect there could be additional gains with another heap type (like 4-ary).
Edit: Not seeing much difference with a 4-ary heap ([branch](https://github.com/pgvector/pgvector/compare/ivfflat-4-ary)).