pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feedFrom: xiaojunxiang2023 (@xiaojunxiang2023) <noreply+xiaojunxiang2023@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #810: Inserting into a pgvector table with an HNSW index is very slow, And update more slow
Date: Thu, 27 Mar 2025 05:34:57 +0000
Message-ID: <gh-pgvector-pgvector-810-c2756746679@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-810@github.com>
References: <gh-pgvector-pgvector-810@github.com>
> Hi [@xiaojunxiang2023](https://github.com/xiaojunxiang2023), a few questions:
>
> 1. What values are you using for `m` and `ef_construction`?
> 2. How are you loading the data (single row insert, multi-row insert, text copy, or binary copy)?
> 3. What type of disk are you using?
> 4. What is the schema of the table (including all indexes, foreign keys, etc.)?
>
> It'd also be helpful to see the output of `EXPLAIN (ANALYZE, BUFFERS)` of a single row insert statement (use `BEGIN; EXPLAIN ...; ROLLBACK;` to prevent the insert from being committed).
Thank you for your response.
I am using index parameters M=64 and efConstruction=128, my pgdata disk is NVME type. And use multi-row insert(the insert sql with 100 rows)

I utilized the vectordb-bench benchmarking tool, testing with an empty table containing only the id and embedding fields for data insertion.
**This is during the initial run, where each batch of 100 inserts takes around 1.5 seconds.**

**As the table data increases,** with 16900 rows in the table, **each batch insert now takes around 4 seconds**. **And it keeps getting worse.**


My PostgreSQL Clusterinfo:



view thread (22+ messages) latest in thread
Message-ID: <gh-pgvector-pgvector-810-c2756746679@github.com>
Permalink: ../gh-pgvector-pgvector-810-c2756746679@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