From: michaelbautin (@michaelbautin) <noreply+michaelbautin@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #765: Functions to estimate the amount of memory for building an HNSW index
Date: Tue, 28 Jan 2025 02:14:34 +0000
Message-ID: <gh-pgvector-pgvector-765-c2617587611@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-765@github.com>
References: <gh-pgvector-pgvector-765@github.com>
@ankane The formulas in this PR are very precise (less than 0.01% error in my experiments), as long as we know the vector sizes. For sparse vectors, where the vector size might vary, this would be more complicated. But to compute the same formulas outside of the pgvector code, we would have to know various sizeof values of internal data structures. So any memory sizing automation code would have to know these internal details.