Sunday, February 16, 2020

Cursor_Sharing

Cursor Sharing Yes/No What affects Bind Peeking
exact yes No literal replacement, no change in qry
force Yes Yes literal replacement yes bind peeking
force No
Similar Yes No literal replacement, no change in qry
Similar No Yes literal replacement

Application developers should use bind variables in their programs to maximize the reuse
of their previously parsed commands in the shared SQL area. If bind variables are not in use, you
may see many very similar statements in the library cache: queries that differ only in the literal
value in the WHERE clause.
Statements that are identical except for their literal value components are called similar
statements. Similar statements can reuse previously parsed commands in the shared SQL area if
the CURSOR_SHARING initialization parameter is set to FORCE. Use EXACT (the default) if the
SQL statements must match exactly including all literals.

No comments:

Post a Comment