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.
-------------------------------
Oracle does allow us to keep cursors open longer than usual. When set to true (the default is false), the instance parameter cursor_space_for_time keeps all cursors pinned until they are specifically closed. Even after cursor execution has completed, Oracle will keep the cursor pinned, and it will stay that way until the cursor is closed.
But as with all tuning changes, there is a trade-off. This instance parameter affects all cursors in the entire Oracle instance. Furthermore, it is not session-specific, and the parameter change requires an instance restart to take effect. The very real implication is much more shared pool memory will now be required to cache library cache objects. In fact, the effect can be so dramatic that the shared pool could effectively run out of memory, resulting in the dreaded 4031, "out of shared pool memory" error. So care must be taken when setting this parameter.
Personally, I do not enable this option unless there is clearly a parsing problem, identified by at least two of three situations: CPU consumption dominated by parse time and either shared pool latch contention or library cache latch or mutex contention. Conversely, if there are "out of shared pool memory" errors occurring, be sure to check that cursor_space_for_time is set to false.
©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.
|