denrepo

Init parameterOptimizer & SQL

OPTIMIZER_ADAPTIVE_PLANS

Changes immediatelyCan set per session

What it controls

Lets the optimizer switch join methods during the first execution (12.2 and later).

Know this before you change it

Usually left on.

Default: TRUE

Check and change it

optimizer_adaptive_plans.sql
1-- Current value on every instance2SELECT inst_id, name, value, isdefault, ismodified3FROM gv$parameter4WHERE name = 'optimizer_adaptive_plans';5 6-- Value stored in the spfile7SELECT sid, value FROM v$spparameter WHERE name = 'optimizer_adaptive_plans' AND isspecified = 'TRUE';8 9-- Dynamic: takes effect now and is kept after a restart10ALTER SYSTEM SET optimizer_adaptive_plans = TRUE SCOPE = BOTH SID = '*';11 12-- Or for your own session only13ALTER SESSION SET optimizer_adaptive_plans = TRUE;14 15-- Remove it from the spfile to go back to the default at the next restart16ALTER SYSTEM RESET optimizer_adaptive_plans SCOPE = SPFILE SID = '*';

Open in the parameter referenceOracle's reference

More in Optimizer & SQL