It's well known that the setting cursor_sharing=similar
has caused issues for many years.
Oracle has always had an issue with implementing
cursor peeking, a method whereby Oracle re-evaluates an
execution plan to consider the value of a reentrant host variable.
To use peeking, BOTH of the following condition must be
true:
- You have reentrant SQL using host variables.
- The referenced column is heavily skewed, such that
value of the host variable would influence the optimizer choice
of execution plan.
This is a very rare case, such as a host variable with a highly
skewed value, such that one host variable would have the "best"
explain plan with a full-table scan while a more unpopular host
variable value would be "best" with an index scan.
Starting with 11g, Oracle implemented a more intelligent
solution to this rare case with the
adaptive cursor sharing method to handle these rare cases,
making cursor_sharing=similar obsolete.
Oracle has decided to deprecate cursor_sharing=similar,
a smart move since the overhead of peeking into a bind variable is
more expensive than the unnecessary invocation of a full-table scan
for a super-popular bind variable value.
The My Oracle Support Community (MOSC) as announced the
depreciation of the cursor_sharing=similar setting, per
MOSC Note 1169017.1 titled
Deprecating the cursor_sharing = 'SIMILAR' setting:
"We recommend that customers discontinue
setting cursor_sharing = SIMILAR due to the many problematic
situations customers have experienced using it.
The ability to set this will be removed in
version 12 of the Oracle Database (the settings of EXACT and FORCE
will remain available).
Instead, we recommend the use of Adaptive
Cursor Sharing in 11g."
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|