I\'m using SQLAlchemy for a project, and need to be able to specify a session variable/setting for one specific call for performance reasons:
set session max
I finally ended up doing this to get it working:
Session = sessionmaker() ... session.connection().execute('SET max_heap_table_size = 1024 * 1024 * 64');
The SQLAlchemy event didn't seem to work, but then again, its possible I wasn't doing it exactly right.