pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: 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: Fri, 28 Mar 2025 04:28:01 +0000
Message-ID: <gh-pgvector-pgvector-810-c2760147374@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-810@github.com>
References: <gh-pgvector-pgvector-810@github.com>

> Based on the `EXPLAIN` output:
> 
> * It's using an index to lookup the row to update (which is taking < 0.05 ms)
> * The HNSW index is in-memory
> 
> It looks like you've only shared a subset of the schema, so it may be something with one of the other indexes or constraints.
> 
> Edit: If this was an issue with the HNSW index, it should show up in the insert time as well.

The unrelated fields in the above \d output were removed by me to avoid information interference. Could it be that other scalar fields and another vector field are causing the issue?
The full \d info is:
mme_light=# \d light_test_db.light_test_table;
```
                 Table "light_test_db.light_test_table"
     Column      |         Type         | Collation | Nullable | Default 
-----------------+----------------------+-----------+----------+---------
 parent_mm_id    | character varying    |           |          | 
 imgfea_swin     | vector(1024)         |           |          | 
 imgfea_resnet50 | vector(1024)         |           |          | 
 mm_id           | character varying    |           | not null | 
 txtembd_bge_m3  | vector(1024)         |           |          | 
Indexes:
    "light_test_table_pkey" PRIMARY KEY, btree (mm_id)
    "imgfea_swin_light_test_table_auto_index" hnsw (imgfea_swin vector_l2_ops) WITH (m='64', ef_construction='128') WHERE imgfea_swin IS NOT NULL
    "light_test_table_txtembd_bge_m3" hnsw (txtembd_bge_m3 vector_l2_ops) WITH (m='16', ef_construction='64') WHERE txtembd_bge_m3 IS NOT NULL
    "mm_id_light_test_table_auto_index" btree (mm_id)
```

view thread (22+ messages)  latest in thread

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