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.
-------------------------------
Figure 7-3 abstracts the library cache implementing mutexes and highlighting the various architectural components, yet without specific object names. Library cache objects are searched using a hashing structure, so you would expect to see buckets, such as bucket BKT 200. When mutexes are implemented, there is a mutex associated with each handle, so each memory chunk shown in Figure 7-3 has an associated mutex. Each hash chain can contain zero or more handles, which relates to zero or more library cache objects, such as cursor CSR 500 and table TBL 400. Each parent cursor will have at least one child cursor. As described earlier, a parent cursor, such as CSR 500 in Figure 7-3, can be associated multiple child cursors, such as CCSR 600 and CCSR 610.
Figure 7-3. A simple conceptual model of an Oracle library cache. The model shows hash buckets (BKT), cursors (CSR), child cursors (CCSR), and table references (TBL).
A key library cache characteristic is the object relationships. In Figure 7-3, notice that table TBL 400 is associated with the three child cursors CCSR 600, CCSR 610, and CCSR 620. So, if table TBL 400 is altered, Oracle knows which library cache objects to invalidate. For example, if table TBL 400 were altered and Oracle deemed the alteration severe enough to invalidate the library cache entry, then all the associated library cache objects would also be invalidated. And, of course, serialization must be maintained, so you can see how even a relatively small library cache can become quite intense.
©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.
|