First page Back Continue Last page Graphics
Enabling Cursor Sharing
Turn on with initialization parameter
Values
- EXACT
- Essentially disables the feature
- Query must match exactly to share a cursor
- FORCE
- Remove literals
- Replace with bind variables
- SIMILAR
- Would changing literal change plan?
- No – replace with bind variable
- Yes – leave alone
Notes:
Cursor sharing is enabled with the initialization parameter CURSOR_SHARING. Valid values include:
EXACT – Disables cursor sharing.
FORCE – Enables the feature and causes Oracle to replace all character and numeric constants with bind variables. Queries that are identical except for constants (literals) will share a memory cursor.
SIMILAR is a new cursor_sharing option with Oracle9i. It causes Oracle to see if the literals are “safe” to replace. By “safe”, Oracle means that if changing the literal would not cause a plan change, replace the literal with a bind variable, else leave the literal in the query.