// oracle · connections

session_cached_cursors

Cursors per session kept in the session cursor cache after they close.

Default
50
Range
0 to an OS-dependent maximum
Restart needed
No
Default checked on
Oracle AI Database 26ai / 23ai

What it does

Repeated parse calls for a cached statement skip the library cache search (a 'softer' soft parse).

Default value

50. 50 (Oracle 23ai/26ai).

Check the current value

SHOW PARAMETER session_cached_cursors

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'session_cached_cursors';

Change it

ALTER SESSION SET session_cached_cursors = 200;   -- this session

ALTER SYSTEM SET session_cached_cursors = 200 DEFERRED SCOPE=BOTH;   -- new sessions

No restart, but ALTER SYSTEM needs the DEFERRED keyword and the value applies only to sessions that connect afterwards. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When to change it

Applications that parse the same statements repeatedly, visible as high 'session cursor cache hits' relative to parse count (total).

What can go wrong

More PGA per session.

Questions about session_cached_cursors

What is the default value of session_cached_cursors in Oracle?

50. 50 (Oracle 23ai/26ai).

Does changing session_cached_cursors require a restart?

No. No restart, but ALTER SYSTEM needs the DEFERRED keyword and the value applies only to sessions that connect afterwards. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When should I change session_cached_cursors?

Applications that parse the same statements repeatedly, visible as high 'session cursor cache hits' relative to parse count (total).

Back to all Oracle settings, or check the Oracle manual for every option.

// one client for every engine

Check session_cached_cursors on your own server

SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.