pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: wahajali (@wahajali) <noreply+wahajali@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #688: HNSW Index Size Constant with Different Index Build Params
Date: Tue, 01 Oct 2024 09:44:29 +0000
Message-ID: <gh-pgvector-pgvector-688@github.com> (raw)

I'm am using an OpenAI 1536 dim (500K) dataset provided by VectorDBBench - a benchmarking tool for vector database. I've run several test with different index build parameters, but for this particular dataset I noticed that the index size remains constant:
I have used the following index build parameters all resulting in a index size of 3906MB:
 m=16, ef_construction=128
 m=16, ef_construction=32
 m=16, ef_construction=64
 m=32, ef_construction=128
 m=32, ef_construction=64
 m=8, ef_construction=128
 m=8, ef_construction=32
 m=8, ef_construction=64

This seems counterintuitive. I also saw this [post](https://jkatz05.com/post/postgres/pgvector-hnsw-performance/#:~:text=There%E2%80%99s%20likely%20wor-...) by one of the contributors, that shares similar observations for another OpenAI dataset (dbpedia-openai-1000k-angular (1M, 1536-dim)). 

Is there an explanation on why the index might result in the same size even with different params?

I use the following command to get the index size:
```
SELECT pg_size_pretty(pg_table_size('table_name')) as table_size, pg_size_pretty(pg_table_size('index_name')) as index_size;
```

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-688@github.com>
Permalink:  ../gh-pgvector-pgvector-688@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