optimizer_features_enable
Umbrella switch that pins the optimizer's behavior and defaults to a named Oracle release.
- Padrão
Set at creation- Range
- Valid release identifiers, 8.0.0 up to the current release
- Restart needed
- Não
- Default checked on
- Oracle AI Database 26ai / 23ai
O que faz
Values are release identifiers such as 11.2.0.4, 19.1.0 or 23.1.0, each enabling the optimizer features of that release. Changing it invalidates existing cursors, so plans can flip in either direction; per session it is the standard way to compare an upgraded database against its old behavior.
Valor padrão
Set at creation. The release the database was created with: 23.1.0 on a 23ai-created database (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER optimizer_features_enable SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'optimizer_features_enable';
Change it
ALTER SESSION SET optimizer_features_enable = 19.1.0; -- this session ALTER SYSTEM SET optimizer_features_enable = 19.1.0 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
After an upgrade whose plans regressed, per session or per service, while baselines and SQL plan management catch up.
What can go wrong
A value pinned years back hides every fix and better plan since then, and mixed values across sessions make plans hard to compare or reproduce.
Questions about optimizer_features_enable
What is the default value of optimizer_features_enable in Oracle?
Set at creation. The release the database was created with: 23.1.0 on a 23ai-created database (Oracle 23ai/26ai).
Does changing optimizer_features_enable 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_features_enable?
After an upgrade whose plans regressed, per session or per service, while baselines and SQL plan management catch up.
Back to all Oracle settings, or check the Oracle manual for every option.
Check optimizer_features_enable 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.
Texto e dados desta página: CC BY 4.0, com crédito ao SQLly (sqlly.app). Código e trechos SQL: MIT. Detalhes da licença