Oracle Performance Firefighting
by Craig Shallahamer

Get the book here



Craig Shallahamer's Blog

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.
Please—Out 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.

-------------------------------

Enqueues are used to lock relational and nonrelational Oracle structures in an orderly fashion. The relational structures could be Oracle data dictionary tables or application tables. For example, when Oracle updates the sys.col$ table or an application updates its employee table, enqueues are involved. If a server process is prevented from locking a table, not only will it be posting an enqueue wait event, but the lock will show in v$lock, dba_lock, v$enqueue_statistics and other views. Nonrelational structures that are locked to prevent an inappropriate change could be a library cache cursor.

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.

©2009, 2010 by Craig Shallahamer. This is copyrighted material.
Please—Out 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.


Know what's important before it's too late!

OraPub's
Performance Training

is like no other...





More Class Pics...
Get student testimonials!