0

If you need to minimize concurrency as much as possible, which isolation level (repeatable read, serializable, read committed, read uncomitted) would work best?

John Smith
  • 4,402
  • 4
  • 32
  • 34
  • Please specify what brand of database you're using. Transaction isolation levels vary by brand of RDBMS in their behavior and their terminology. – Bill Karwin Jun 15 '09 at 18:58
  • 1
    It might help to explain why you want to minimize concurrency. That's tantmount to minimizing performance, which is not typically something people ask for. – cjs Jun 15 '09 at 18:59
  • @Bill Karwin: I'm guessing he meant the SQL standard – John Smith Jun 15 '09 at 19:00

2 Answers2

1

Serializable gives the most isolation, thus least concurrency.

http://en.wikipedia.org/wiki/Isolation_(database_systems)

John Smith
  • 4,402
  • 4
  • 32
  • 34
0

I'm guessing you really want to maximize concurrency as much as possible here, to increase performance. Unfortunately, simply choosing an isolation mode won't do the trick. The real question about those isolation modes is, can you use them in your particular application?

That really depends on the intimate details of your application, and that's probably not something we can debug on Stack Overflow.

However, in general, assuming you don't get data corruption, from most concurrent to least, the isolation levels for Oracle are:

  1. read uncommitted
  2. read committed
  3. repeatable read
  4. serializable.

It's different for, say, PostgreSQL because it uses a different synchronization model (MVCC), where reading is free, but when you write you run the risk of rollback.

I suppose the real answer to this question is, ask and get leads to many days of study materials, or just hire someone to deal with your particular situation. While it's very technical, there are no hard and fast rules: you need to understand both the theory behind what's going on and the specific situation in order to make a useful recommendation.

cjs
  • 25,752
  • 9
  • 89
  • 101