From: aasneh-prasad-glean (@aasneh-prasad-glean) <noreply+aasneh-prasad-glean@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #909: Optimising Insert+Index creation time
Date: Fri, 10 Oct 2025 12:13:47 +0000
Message-ID: <gh-pgvector-pgvector-909@github.com> (raw)
Hi folks,
Firstly, I appreciate the pgvector team's work on this excellent software.
I'm currently evaluating pgvector as a vector DB solution and need to optimize the loading+index building time. My current workflow consists of:
1. Inserting embeddings and metadata using the `CREATE TABLE` command.
2. Performing HNSW indexing in the background with the `CREATE INDEX CONCURRENTLY` command.
- dimension of vectors: 128
- ef_construction: 600
- m: 64
My setup involves a `db-custom-2-8192` machine (2 Vcpus, 8 GB RAM, 100 GB SSD), and I'm loading approximately 1.5M vectors. Step 1 takes about 1.7 hours, while Step 2 takes about 12 hours. The peak RAM usage was 6.11 GB, with a final usage of around 3.6 GB.
Given that we intend to use a machine type with close to 8 GB of RAM, what parameter tuning or configuration adjustments can be made to reduce the loading and indexing times?