Thanks again Mike. One more motive to stick to Postgres :)

Cheers,
Richard.


On 04/26/2013 02:11 PM, Michael Bayer wrote:
serializable will reduce performance, yes. There's not much way around it, though the tradeoffs vary greatly depending on database. Postgresql for example introduces fairly minimal overhead versus repeatable read (see http://www.postgresql.org/docs/9.1/static/transaction-iso.html) since they're able to get away without using more locks. Traditionally, serializable means more locks (see http://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Serializable).



On Apr 26, 2013, at 1:00 PM, Richard Gerd Kuesters <[email protected] <mailto:[email protected]>> wrote:

Mike, this is interesting stuff.

Let's say I use isolation_level as serializabe. Is there a counterpart in performance? If yes, is there something I can do to counter weight? ie. bigger connection pool, stream_results (psycopg), etc.


Cheers,
Richard.


On 04/26/2013 11:02 AM, Michael Bayer wrote:
you can make a Session like this:

conn = engine.connect().execution_options(isolation_level='SERIALIZABLE')
session = Session(bind=conn)

# work with session

session.commit()

isolation level is per-transaction.

the default is not set by SQLAlchemy it depends on how your database is configured.



On Apr 26, 2013, at 7:48 AM, sajuptpm <[email protected] <mailto:[email protected]>> wrote:

Hi Michael Bayer,

Is there any way to dynamically change Transaction Isolation Level ??

I want to do it only for a particular operation. So I can't set it at "Engine" or "Connection" Level, right ??

I am using turbogears + Sqlalchemy with defaultisolation_level.

What is the defaultisolation_level ??


=================

Also tried DBSession.expire_all() and DBSession.expunge_all(), but not getting Updated row in waiting transaction.

http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#sqlalchemy.orm.session.Session.expire_all
http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#sqlalchemy.orm.session.Session.expunge_all



Thanks,

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
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 [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
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 [email protected].
To post to this group, send email to [email protected].
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