A. It determines the optimal table join order and method. 它确定了最优表的连接顺序和方法。 B. It generates execution plans for SQL statements based on relevant schema objects, system and session parameters, and information found in the Data Dictionary. 它根据相关的模式对象、系统和会话参数,以及在数据字典中找到的信息,为SQL语句生成执行计划。 C. It can re-optimize execution plans after previous executions detect suboptimal plans. 它可以在以前的执行检测到次优计划后,重新优化执行计划。
Oracle 优化器 Oracle的优化器Optimizer详解
show parameter optimizer_mode
select name, value from v$parameter where name='optimizer_mode';
exec dbms_stats.delete_table_stats(user,'T',cascade_parts => true,cascade_columns => true);
explain plan for select * from t where owner='SYS';
select * from table(dbms_xplan.display(null,null,'advanced'));
exec dbms_stats.gather_table_stats(user,'T',cascade => true);
explain plan for select * from t where owner='SCOTT';
select * from table(dbms_xplan.display(null,null,'advanced'));
|