From: geuis (@geuis) <noreply+geuis@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
Date: Fri, 06 Dec 2024 23:26:05 +0000
Message-ID: <gh-pgvector-pgvector-726@github.com> (raw)
I'm using Prisma migrations for schema management.
It doesn't seem that we're able to do something like this in a migration file:
```
ALTER SYSTEM SET hnsw.ef_search = 400;
SELECT pg_reload_conf();
```
We have a need to keep as many changes to db structure and settings in source control, also because all replicas need to have the same settings etc.
Is there a recommended way to do this?
Should we perform every query as a transaction and do `SET hnsw.ef_search = 400` at the query level?
Or is it possible to do the equivalent when creating the index?
```
CREATE INDEX CONCURRENTLY hnsw_vector_embedding_idx ON cake_table USING hnsw (vector_embedding vector_cosine_ops) WITH (...);
// (the "WITH (...)" being something we can set here)?
```