Database Reference
In-Depth Information
Summary
In this chapter we looked at how Oracle manages concurrency through locks on rows, objects, and memory
structures. Oracle uses TX locks to ensure that only one transaction is modifying a row at a given time. Oracle uses
DM locks to ensure that the structure of an object isn't changed while its contents are being modified. We examined
helpful queries that show the transaction details and identify sessions holding the lock and also show the sessions
blocked from obtaining a lock.
We also discussed latches, which are lightweight serialization devices used to coordinate multiuser access to
shared data structures, objects, and files. Latches are locks designed to be held for very short amount of time. They are
used to protect memory structures in the block buffer cache, library cache, and the shared pool. We also talked about
a mutex, which is a serialization device similar to a latch. A mutex is a much more efficient serialization device and is
used in place of traditional latches in many places in the server (starting with Oracle 10 g and above).
Lastly we briefly looked at manual locking methods. The most common manual locking method is the
SELECT...FOR UPDATE statement. Other than that, for the most part you'll never need to implement manual locking
methods (such as LOCK TABLE ).
In the next chapter we'll investigate multiversioning (Oracle's ability to simultaneously materialize multiple
versions of the data). This is the mechanism by which Oracle provides read-consistent views of data. We'll also take a
detailed look at how Oracle implements multiversioning in regard to transaction isolation levels.
 
Search WWH ::




Custom Search