pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #726: options to specify hnsw.ef_search
5+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
@ 2024-12-06 23:26 "geuis (@geuis)" <noreply+geuis@github.com>
  0 siblings, 0 replies; 5+ messages in thread

From: geuis (@geuis) @ 2024-12-06 23:26 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

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)?
``` 

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
@ 2024-12-09 16:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2024-12-09 16:08 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @geuis, if the value is static, you'll probably want to set it on the system, database, or user level (#167) instead of the query level. There isn't currently a way to set it on the index level (#235).

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
@ 2024-12-09 16:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2024-12-09 16:08 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
@ 2024-12-09 20:13 ` "geuis (@geuis)" <noreply+geuis@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: geuis (@geuis) @ 2024-12-09 20:13 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Thanks @ankane. 

Got a followup. We're using Pulumi for overall infra management including Postgres deploys so that seems the way to go for this.

GCP supports the pgvector extension, but they have no documentation on whether setting `hnsw.ef_search` as a databaseFlag is supported or not. https://cloud.google.com/sql/docs/postgres/extensions

Do you have any information about the topic?

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #726: options to specify hnsw.ef_search
@ 2024-12-09 21:55 ` "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2024-12-09 21:55 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I don't (but it's a regular GUC variable).

^ permalink  raw  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2024-12-09 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-06 23:26 [pgvector/pgvector] issue #726: options to specify hnsw.ef_search "geuis (@geuis)" <noreply+geuis@github.com>
2024-12-09 16:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-12-09 16:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-12-09 20:13 ` "geuis (@geuis)" <noreply+geuis@github.com>
2024-12-09 21:55 ` "ankane (@ankane)" <noreply+ankane@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