Showing posts with label cursors. Show all posts
Showing posts with label cursors. Show all posts

Wednesday, October 24, 2007

cursor cache

An article at orafaq on cursors

Main point is that
OPEN_CURSORS
parameters limits the number of currently opened cursors by each session. If this number is exceeded the session will get en error. And
session_cached_cursors
is something totally different and independent from open_cursors. The idea behind the cursor cache is to hold "popular" cursors opened. If a cursor is being parsed every time it's opened, it causes a latch contention and concurrency starts to suffer. So to protect the database from a badly written code, you can cache the cursors. The number of cached cursors is set by the session_cached_cursors. The value is per-session. It can be set system-wide (needs a restart) or by ALTER SESSION. As I have understood, cursor cache is a part of PGA, so it will not effect the shared pool if this parameter is increased.