Announcement Announcement Module
Collapse
No announcement yet.
Locking Question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Locking Question

    I`m doing some research about locking for a blogentry and I can`t find the answer to a question.

    The question is:
    If the isolation level is serializable (and you are working with a database) is the complete table locked when it is queried (for the duration of the transaction) ?

    For repeatable read you get row locks, but it allows phantom reads. The only way to make sure you don`t get phantom reads (in the serialized isolation level) is by having a complete table lock.

    Or could it be that it totally up to the database implementation what is locked?
    Last edited by Alarmnummer; Feb 17th, 2006, 03:23 AM.

  • #2
    Or could it be that it totally up to the database implementation what is locked?
    Not really an answer but I think each database will have its own implementation in order to squeeze performance. You can indicate the appropriate behavior by setting certain parameters (possible through jdbc when your application starts and before any transactions are started).
    At least mysql works this way: http://dev.mysql.com/doc/refman/5.0/...locks-set.html
    AFAIK, oracle has a similar mechanism (I can only recall the ROW_LOCKING parameter).

    Comment

    Working...
    X