[sqlalchemy] Caching intermediate results in baked queries

2018-11-13 Thread Martijn van Oosterhout
Hoi, We're starting to do some pretty complicated things with the SQLAlchemy bakery (because we have some pretty complicated queries) and I have something I'd like to verify. We have queries that are constructed like so (each letter is a step): A B C .. M N0 A B C .. M N1 A B C .. M N2 A B C

Re: [sqlalchemy] set a query timeout on a per query basis

2018-11-13 Thread Mike Bayer
you can set that then with before_cursor_execute() and then reset it on after_cursor_execute(). On Tue, Nov 13, 2018 at 12:44 PM Jonathan Vanasco wrote: > > In postgres, you can execute: > > SET statement_timeout = 6; > > at any point. It lasts until the end of the "session", which I

Re: [sqlalchemy] set a query timeout on a per query basis

2018-11-13 Thread Jonathan Vanasco
In postgres, you can execute: SET statement_timeout = 6; at any point. It lasts until the end of the "session", which I believe would be the SqlAlchemy connection's lifetime. On Monday, November 12, 2018 at 6:44:06 PM UTC-5, Mike Bayer wrote: > > > if statement_timeout is accepted