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 #559: Adding data after building hnsw index is much slower
Date: Fri, 17 May 2024 11:33:49 +0000
Message-ID: <gh-pgvector-pgvector-559-c2117399664@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-559@github.com>
References: <gh-pgvector-pgvector-559@github.com>

@huaimin016 Using `INSERT` for this operation will be slow. You should use `COPY`, and specifically, `BINARY` mode with `COPY` to avoid the overhead of converting from binary => text => binary.

Here is an example of how to do that, and its benefits: https://github.com/erikbern/ann-benchmarks/pull/488/files

view thread (8+ messages)  latest in thread

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