Documente Academic
Documente Profesional
Documente Cultură
So far, so good.
The problem is that all those parameters control the undocumented parameter
_OPTIMIZER_PERFORMANCE_FEEDBACK without checking how the others are set.
As a result, knowing the value of the documented parameters isn’t enough to know
whether statistics feedback is enabled. What you have to know is the order in which
they were set! Alternatively you can check the value of the undocumented parameter.
To demonstrate that behavior I wrote this script. It’s output, when executed against 12.1
and 12.2, is the following. As you can see, when PARALLEL_DEGREE_POLICY is set
after OPTIMIZER_ADAPTIVE_FEATURES/ OPTIMIZER_ADAPTIVE_STATISTICS,
performance feedback is incorrectly enabled.
12.1
VERSION
-----------------------------------------------------------------------------
-------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
WHAT
-----------------------------------------------------------------------------
-------
Set optimizer_adaptive_features *before* parallel_degree_policy
optimizer_adaptive_features parallel_degree_policy
_optimizer_performance_feedback
--------------------------- ---------------------- --------------------------
-----
FALSE MANUAL OFF
FALSE LIMITED OFF
FALSE AUTO OFF
FALSE ADAPTIVE ALL
TRUE MANUAL OFF
TRUE LIMITED OFF
TRUE AUTO OFF
TRUE ADAPTIVE ALL
WHAT
-----------------------------------------------------------------------------
-------
Set optimizer_adaptive_features *after* parallel_degree_policy
parallel_degree_policy optimizer_adaptive_features
_optimizer_performance_feedback
---------------------- --------------------------- --------------------------
-----
MANUAL FALSE OFF
LIMITED FALSE OFF
AUTO FALSE OFF
ADAPTIVE FALSE OFF
MANUAL TRUE OFF
LIMITED TRUE OFF
AUTO TRUE OFF
ADAPTIVE TRUE ALL
12.2
VERSION
-----------------------------------------------------------------------------
-------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
WHAT
-----------------------------------------------------------------------------
-------
Set optimizer_adaptive_statistics *before* parallel_degree_policy
optimizer_adaptive_statistics parallel_degree_policy
_optimizer_performance_feedback
----------------------------- ---------------------- ------------------------
-------
FALSE MANUAL OFF
FALSE LIMITED OFF
FALSE AUTO OFF
FALSE ADAPTIVE ALL
TRUE MANUAL OFF
TRUE LIMITED OFF
TRUE AUTO OFF
TRUE ADAPTIVE ALL
WHAT
-----------------------------------------------------------------------------
-------
Set optimizer_adaptive_statistics *after* parallel_degree_policy
parallel_degree_policy optimizer_adaptive_statistics
_optimizer_performance_feedback
---------------------- ----------------------------- ------------------------
-------
MANUAL FALSE OFF
LIMITED FALSE OFF
AUTO FALSE OFF
ADAPTIVE FALSE OFF
MANUAL TRUE OFF
LIMITED TRUE OFF
AUTO TRUE OFF
ADAPTIVE TRUE ALL