optimizer_features_enable
Umbrella switch that pins the optimizer's behavior and defaults to a named Oracle release.
- 기본값
Set at creation- Range
- Valid release identifiers, 8.0.0 up to the current release
- Restart needed
- 아니요
- Default checked on
- Oracle AI Database 26ai / 23ai
기능
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.
기본값
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.
이 페이지의 텍스트와 데이터: CC BY 4.0, 출처: SQLly (sqlly.app). 코드와 SQL 스니펫: MIT. 라이선스 세부 정보