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.
-------------------------------
The cursor is a fundamental object that is a complete executable representation of a SQL statement or a PL/SQL programmatic construct, which can be used and reused by any authorized session. Cursors must be created, locatable (that is, found by a search), destroyed (deallocated), invalidated, and reloaded. If any part of the cursor is not in the shared pool and is needed for any reason, that aspect must be reloaded, which does slow performance.
Developers typically have a good understanding of cursors because they have needed to specifically create, open, execute, fetch, and close cursors. DBAs commonly look at cursors as simply memory chunks related to SQL. However, this simplistic view inhibits our ability to create solutions to cursor-related performance problems. So, if you take the time to better understand cursors, you'll notice your performance solution options will significant increase.
The term cursor is in itself an abstraction and is used to refer to shared information (located in a shared SQL area), private information (located in a session's PGA), and the library cache chain node (called a handle when referring to the library cache) used to locate the various cursor components. Unfortunately, this multipurpose definition also adds to the confusion.
©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.
|