-
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…
-
Measuring the Cost of Latching a Shared Resource- Locking and Latching
As an example, we’ll study the cost of latching the shared pool. We’ll compare a well- written program (one that uses bind variables) and a…
-
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…
-
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…
-
Blocked Inserts- Locking and Latching
There are a few times when an INSERT will block. The most common scenario is when you have a table with a primary key or…
-
TX (Transaction) Locks- Locking and Latching-2
Here is a small example showing how this happens, using three V$ tables: •\ V$TRANSACTION, which contains an entry for every active transaction.•\ V$SESSION, which…
-
What Are Locks?- Locking and Latching-3
It was during a benchmark that I discovered just how wrong I was. In the early days of these databases, it was common for the…
-
Optimistic Locking Using a Version Column – Locking and Latching
This is a simple implementation that involves adding a single column to each database table you wish to protect from lost updates. This column is…
-
What Are Locks?- Locking and Latching-2
Exactly the same issue affected concurrent updates (since an UPDATE was really a DELETE followed by an INSERT in SQL Server). Perhaps this is why…
-
Locking Issues – Locking and Latching
Before we discuss the various types of locks that Oracle uses, it is useful to look at some locking issues, many of which arise from…