Is there a way to set connection or session parameters before executing a
query? My use case is that I have a specific query that ends up using a
disk merge when run, but if I set *work_mem* to some higher value (e.g.
50M) for this query it can do all of its work in-memory. I don't want to
set *work_mem* that high for all queries though, which is why it's at its
default in the server config file (4MB).
I've tried using *Database::run*, *Database::execute*, and *Database::[]*
but none of those approaches worked. E.g.
ds = DB[...].where(...)
DB[%{SET work_mem TO '50MB';#{ds.sql}}].all
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/8d32279c-daed-4bb7-81ab-6069defb1cf5n%40googlegroups.com.