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