On Saturday, February 14, 2015 at 9:58:26 PM UTC-5, Ed Rahn wrote:
>
> This seems like a fairly common use case, do people just not care about 
> it or how do they handle it? 
>

This isn't common, and looks like an anti-pattern.

Consider these lines from your emails - they're not really compatible with 
one another :

* I have several programs that are Multi Process and long running... they 
open up 30 or so connections and do selects periodically. 
* the default behaviour is to begin a transaction if not currently in one, 
but not commit afterwards.
* I need to maintain DB consistency with transactions

The best way to maintain DB consistency with transactions is to keep the 
transactions/units-of-work as small as possible.  If you have long-running 
transactions across multiple processes... you're creating a situation that 
is conducive to integrity errors or locking tables -- and even creating 
deadlocks.

You may be better off just pulling all the data on startup - or 
periodically - and treating it like a cache.  if you have any write 
operations, use fresh selects -- not the cached data.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to