Re: [sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-14 Thread Romy Maxwell
Thanks Michael. On Fri, Feb 11, 2011 at 1:44 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Feb 11, 2011, at 3:05 PM, Romy wrote: On Feb 11, 9:13 am, Michael Bayer mike...@zzzcomputing.com wrote: autocommit=True means every SELECT statement as well as every flush() uses its own

[sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-11 Thread Romy
Ah, very good to know, thank you. Does this also mean that, assuming a transactional engine like Inno, while using autocommit=True, issuing a session.begin() does nothing since a transaction's already in progress ? On Feb 10, 12:27 pm, Michael Bayer mike...@zzzcomputing.com wrote: DBAPI

Re: [sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-11 Thread Michael Bayer
On Feb 11, 2011, at 4:48 AM, Romy wrote: Ah, very good to know, thank you. Does this also mean that, assuming a transactional engine like Inno, while using autocommit=True, issuing a session.begin() does nothing since a transaction's already in progress ? autocommit=True means every

[sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-11 Thread Romy
On Feb 11, 9:13 am, Michael Bayer mike...@zzzcomputing.com wrote: autocommit=True means every SELECT statement as well as every flush() uses its own transaction, that begins as the method is called, and is immediately closed, within the scope of the method call on your end.   begin() *only*

Re: [sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-11 Thread Michael Bayer
On Feb 11, 2011, at 3:05 PM, Romy wrote: On Feb 11, 9:13 am, Michael Bayer mike...@zzzcomputing.com wrote: autocommit=True means every SELECT statement as well as every flush() uses its own transaction, that begins as the method is called, and is immediately closed, within the scope of the

[sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-10 Thread Romy
On Feb 7, 7:24 am, Michael Bayer mike...@zzzcomputing.com wrote: My recommendation would be to call scopedsession.remove() at the end of a request.  Though with an async server like Tornado, though I haven't used it, I'm not sure that thread local sessions, that is the default behavior of a

Re: [sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-10 Thread Michael Bayer
On Feb 10, 2011, at 6:05 AM, Romy wrote: On Feb 7, 7:24 am, Michael Bayer mike...@zzzcomputing.com wrote: My recommendation would be to call scopedsession.remove() at the end of a request. Though with an async server like Tornado, though I haven't used it, I'm not sure that thread local

[sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-10 Thread Romy
Got it. My remaining question: if I stick with autocommit=False and eventually use a transactional engine, how does wrapping the entire request inside a transaction (say my request starts off with a DB query) affect performance compared to using transactions inside only the critical areas. Is

Re: [sqlalchemy] Re: SQLAlchemy + Elixir + Tornado overall setup

2011-02-10 Thread Michael Bayer
On Feb 10, 2011, at 3:22 PM, Romy wrote: Got it. My remaining question: if I stick with autocommit=False and eventually use a transactional engine, how does wrapping the entire request inside a transaction (say my request starts off with a DB query) affect performance compared to using