From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #653: Table Size Estimate Doesn't Match Actual Size
Date: Thu, 22 Aug 2024 13:26:21 +0000
Message-ID: <gh-pgvector-pgvector-653-c2304672676@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-653@github.com>
References: <gh-pgvector-pgvector-653@github.com>
@wahajali You have to account for the PostgreSQL page size (which defaults to 8KB). For simplicity, as you can only fit one `vector(1536)` per page:
`8192 * 500000` => `4096000000` / (1024 ^ 3) => 3.81GB. (or 3906 MB). The remainder is some overhead around table metadata.