What Are SQL Plan Directives - DBA Paradise
What Are SQL Plan Directives - DBA Paradise
If you ever looked at an execution plan in Oracle 12c, most likely you noticed the
following line, at the bottom of the execution plan:
...
Note
-----
- dynamic statistics used: dynamic sampling (level=2)
Note
-----
...
- 6 Sql Plan Directives used for this statement
EXEC DBMS_SPD.FLUSH_SQL_PLAN_DIRECTIVE;
The retention of the directives is 53 weeks by default, and it can be changed with:
DBMS_SPD.SET_PREFS.
SELECT DBMS_SPD.SET_PREFS('SPD_RETENTION_WEEKS')
FROM dual;
1 Comment
What Should You Do With SQL Plan Directive Changes in 12.1? – DBA Paradise
says:
March 14, 2018 at 11:25 pm
[…] Last week we looked at SQL Plan Directives, what they are, when do they get
created, how they are used and maintained. Need an intro to SQL Plan Directives?
Check out last week’s post: What Are SQL Plan Directives? […]