pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #844: Questions on HNSW graph memory usage and size estimation
Date: Sun, 25 May 2025 12:03:10 +0000
Message-ID: <gh-pgvector-pgvector-844-c2907785013@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-844@github.com>
References: <gh-pgvector-pgvector-844@github.com>

> Is there a way to estimate in advance how much maintenance_work_mem is required so that the HNSW graph can fully fit into memory during index creation? 

I typically do `sizeof(# vectors) * 1.3` - where the `sizeof(vector)` is `8 + dims * 4`.

` Is it equivalent to the index size shown by pg_relation_size()`

You have to call `pg_relation_size` on the name of the index.

view thread (6+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-844-c2907785013@github.com>
Permalink:  ../gh-pgvector-pgvector-844-c2907785013@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox