cursor_space_for_time
The cursor_space_for_time parameter is a tuning knob to allow SQL to stay “pinned” inside the library cache shared pool area, making all SQL ineligible for the aging-out process until the cursor for the SQL statement is closed.
The default for cursor_space_for_time=false which means that it is OK for SQL statement to age out before the cursor is closed.
Setting cursor_space_for_time=true lets you use more space for cursors in order to save time. Oracle recommends that you should only set cursor_space_for_time=true in databases where the shared_pool_size is large enough to hold all open cursors simultaneously.
With cursor_space_for_time=true, Oracle will not bother to check the library cache on subsequent SQL execution calls because the SQL has already been pinned in the library cache. This technique can improve the performance in very rare cases where the shared_pool_size is huge and all SQL can be fully cached, but cursor_space_for_time should not be set to true if there are cache misses on execution calls. Remember, library cache misses indicate that the shared_pool_size is already too small, and forcing the pinning of shared SQL areas with cursor_space_for_time=true will only aggravate an existing problem.
the cursor_space_for_time parameter is being deprecated starting in Oracle 10g release 2.
In sum, this is a very dangerous parameter and you should never set cursor_space_for_time from its default value of false except with the advice and consent of Oracle Technical Support.
Cursor_Sharing
Some Oracle databases with high ad-hoc query activity (Crystal Reports, Business Objects) cannot avoid in-line literals inside the SQL, and that's why Oracle introduced the cursor_sharing parameter. This use of cursor_sharing=force has been shown to provide a huge benefit for database plagued with literals (i.e. non-reentrant SQL) in their library cache.
When to use CURSOR_SHARING
TheCURSOR_SHARING
initialization parameter can solve some performance problems. It has the following values: FORCE
, SIMILAR
, and EXACT
(default). Using this parameter provides benefit to existing applications that have many similar SQL statements.http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i31512
No comments:
Post a Comment