On Thu, May 23, 2013 at 3:32 PM, Michael Bayer <mike...@zzzcomputing.com> wrote:
> If not, it would be nice to call .future() or .promise() on instead of a `
> sqlalchemy.orm.query.Query` instance instead of .all() to batch multiple
> queries and have them executed in a single round trip.  The way NHibernate
> works is it will execute all the queries called with .future() when an
> attempt is made to access the results of one of the query's results.  So if
> you've called .future() on 5 queries, but start to access the results from
> the 3 query before .future() was called on the remaining 2 queries, it will
> make 2 round trips.
>
>
> its not something DBAPI has consistent support for, a few backends allow
> joining of statements with semicolons like SQL server, but for the most
> prominently used systems like Postgresql and SQLite, it's not generally
> possible.


In postgres, it could be implemented with Async I/O and multiple
cursors, but sadly Async is something of a global pool configuration,
not something you can turn on/off per call.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to