当前位置:Gxlcms > 数据库问题 > 11g新特性-自动sql调优(Automatic SQL Tuning)

11g新特性-自动sql调优(Automatic SQL Tuning)

时间:2021-07-01 10:21:17 帮助过:4人阅读

SYS_AUTO_SQL_TUNING_TASK,LOCAL_TIME_LIMIT,1400); dbms_sqltune.set_tuning_task_parameter(SYS_AUTO_SQL_TUNING_TASK,ACCEPT_SQL_PROFILES,TRUE); dbms_sqltune.set_tuning_task_parameter(SYS_AUTO_SQL_TUNING_TASK,MAX_SQL_PROFILES_PER_EXEC,50); dbms_sqltune.set_tuning_task_parameter(SSY_AUTO_SQL_TUNING_TASK,MAX_AUTO_SQL_PROFILES,10002); end;

 管理自动sql调优任务

1.开启自动sql调优

begin
     dbms_auto_task_admin.enable(
          client_name => sql tuning advisor,
          operation => NULL,#在所有维护窗口都开启
          window_name => NULL);
end;

2.关闭自动sql调优

begin
     dbms_auto_task_admin.disable(
          client_name => sql tuning advisor,
          operation => NULL,
          window_name => NULL);
end;

生成文本格式的自动sql调优建议报告:

SQL> variable my_rept CLOB;
SQL> begin 
     :my_rept := dbms_sqltune.report_auto_tuning_task(
          begin_exec=>NULL,
          end_exec=>NULL,
          type=>TEXT,
          level=> TYPICAL,
          section=>ALL,
          object_id=>NULL,
          result_limit=>NULL);
     end;
SQL> print :my_rept

相关视图:

-DBA_ADVISOR_EXECUTIONS
-DBA_ADVISOR_SQLSTATS
-DBA_ADVISOR_SQLPLANS  

 

11g新特性-自动sql调优(Automatic SQL Tuning)

标签:

人气教程排行