Optimistic Locking


  • Manual Locking and User-Defined Locks- Locking and Latching

    So far, we have looked mostly at locks that Oracle places for us transparently. When we update a table, Oracle places a TM lock on…

    READ POST ➔

  • With Bind Variables- Locking and Latching

    Now I’d like to look at the same situation as presented in the previous section, but this time using a program that uses significantly less…

    READ POST ➔

  • Latches- Locking and Latching

    Latches are lightweight serialization devices used to coordinate multiuser access to shared data structures, objects, and files. Latches are locks designed to be held for…

    READ POST ➔

  • DDL Locks- Locking and Latching-1

    DDL locks are automatically placed against objects during a DDL operation to protect them from changes by other sessions. For example, if I perform the…

    READ POST ➔

  • TX (Transaction) Locks- Locking and Latching-4

    This output shows that we were able to lock 37 rows but ran out of transaction slots for the 38th row. For this given block,…

    READ POST ➔

  • TM (DML Enqueue) Locks- Locking and Latching

    TM locks are used to ensure that the structure of a table is not altered while you are modifying its contents. For example, if you…

    READ POST ➔

  • DDL Locks- Locking and Latching-2

    A view that is invaluable for looking at this information is DBA_DDL_LOCKS. There is no V$ view. The DBA_DDL_LOCKS view is built on the more…

    READ POST ➔

  • Latch “Spinning”- Locking and Latching

    One thing I’d like to drive home with regard to latches is this: latches are a type of lock, locks are serialization devices, and serialization…

    READ POST ➔

  • Blocked Merges, Updates, and Deletes- Locking and Latching-1

    In an interactive application—one where you query some data out of the database, allow an end user to manipulate it, and then put it back…

    READ POST ➔

  • Optimistic or Pessimistic Locking? – Locking and Latching

    So which method is best? In my experience, pessimistic locking works very well in Oracle (but perhaps not so well in other databases) and has…

    READ POST ➔