Thursday, January 13, 2005

One of my pet peeves is engineers who work on database and oltp systems but don't have any clue about transactions and isolation levels. Also no clue about pessimistic locking (both in the database and at the application level).

I just had a good discussion about the default isolation levels of various rdbms systems with some engineers I work with and I couldn't easily find the answer on google, so IM putting here the gatherings from a few spots.

SQL SERVER - READ COMMITTED
Oracle - READ COMMITTED (supports only READ COMMITTED, SERIALIZABLE and the non-standard READ ONLY)
DB2 - REPEATABLE READ (supports REPEATABLE READ, UNCOMMITTED READ and 2 non-standard levels)
PostgreSQL - REPEATABLE READ (only supports REPEATABLE READ and SERIALIZABLE)
Mysql InnoDB - REPEATABLE READ
Sybase - READ COMMITTED

Chapter 3 of this book has a good explanation of how to do optimistic locking in your application.

This page is powered by Blogger. Isn't yours?