You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, I want to set pgvector HNSW index configuration parameters for my queries. The parameters are ideally set for the entire session. Unfortunately, my current approach is to invoke three raw queries to set the configuration parameters each and every time before my query:
This doesn't seem efficient as these three individual statements require three distinct calls, each taking a bit of time.
Unfortunately, Supabase doesn't allow setting these configuration parameters globally like so:
ALTER ROLE <my_role> SET hnsw.iterative_scan = 'strict_order';
ALTER ROLE <my_role> SET hnsw.max_scan_tuples = 10000;
ALTER ROLE <my_role> SET hnsw.ef_search = 80;
As I get 42501 permission errors like so:
ERROR: 42501: permission denied to set parameter "hnsw.max_scan_tuples"
Can Drizzle ORM help me do this in a more efficient way? Can I at least set these configuration parameters once for the entire database session? FYI - I'm just using a single role to perform the similarity search query, so that's why I was attempting the above ALTER ROLE commands. Also, I don't need to wrap the configuration properties setting in a db transaction.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Specifically, I want to set pgvector HNSW index configuration parameters for my queries. The parameters are ideally set for the entire session. Unfortunately, my current approach is to invoke three raw queries to set the configuration parameters each and every time before my query:
This doesn't seem efficient as these three individual statements require three distinct calls, each taking a bit of time.
Unfortunately, Supabase doesn't allow setting these configuration parameters globally like so:
As I get 42501 permission errors like so:
ERROR: 42501: permission denied to set parameter "hnsw.max_scan_tuples"
Can Drizzle ORM help me do this in a more efficient way? Can I at least set these configuration parameters once for the entire database session? FYI - I'm just using a single role to perform the similarity search query, so that's why I was attempting the above ALTER ROLE commands. Also, I don't need to wrap the configuration properties setting in a db transaction.
Beta Was this translation helpful? Give feedback.
All reactions