You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
As their name implies, enqueues are very orderly and ensure the structures are changed in a very deterministic manner. Compared to latching, enqueues are very boring and, as I like to say, mature. There is no likelihood or probability involved with enqueues. A process's enqueue request simply gets pushed onto the appropriate queue, and when it's time to be processed, its enqueue entry is popped off the queue (known as a dequeue). Not much excitement here, but then enqueues are not about adventure, they are about ensuring Oracle structures are changed in a very orderly and accountant-like fashion.
Oracle maintains a shockingly large number of enqueues.10 In Oracle Database 10g Release 2, I found 208 enqueues; in Oracle Database 11g Release 1, I found 247 enqueues. But don't panic, because there are only a handful of enqueues you're likely to encounter. Plus if you're a seasoned DBA, you have already been dealing with row- and table-level locks, which use enqueues.
When solving enqueue problems, first determine the enqueue type, then determine the SQL involved, and finally develop a solution based on your knowledge of the application and the associated Oracle internals. Before I drill down into the most common enqueue wait, the transaction (TX) enqueue, it's important to know how to determine which enqueue is being waited upon and the associated sessions for both pre-Oracle Database 10g and later systems.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|