optimizer_adaptive_plans
Allow plans to switch join methods or parallel distribution at run time.
- 預設
TRUE- Range
- TRUE, FALSE
- Restart needed
- 否
- Default checked on
- Oracle AI Database 26ai / 23ai
其作用
The optimizer can postpone the final join method choice until it sees actual row counts from the first execution.
預設值
TRUE. TRUE since Oracle 12.2 (where it replaced optimizer_adaptive_features). Same in 23ai.
Check the current value
SHOW PARAMETER optimizer_adaptive_plans SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'optimizer_adaptive_plans';
Change it
ALTER SESSION SET optimizer_adaptive_plans = FALSE; -- this session ALTER SYSTEM SET optimizer_adaptive_plans = FALSE SCOPE=BOTH;
No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. 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
Rarely turned off; disable per statement with a hint if one plan flips badly.
What can go wrong
Turning it off loses runtime correction of bad cardinality estimates.
Questions about optimizer_adaptive_plans
What is the default value of optimizer_adaptive_plans in Oracle?
TRUE. TRUE since Oracle 12.2 (where it replaced optimizer_adaptive_features). Same in 23ai.
Does changing optimizer_adaptive_plans require a restart?
No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. 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 optimizer_adaptive_plans?
Rarely turned off; disable per statement with a hint if one plan flips badly.
Back to all Oracle settings, or check the Oracle manual for every option.
Check optimizer_adaptive_plans 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.