2007年10月16日 星期二

oracle10G使用dbms_sqltune

三大功能
ACCESS PATH ANALYSIS
SQL Structure Analysis
SQL Tuning Advisor Recommendations
sample
------
declare
tname varchar2(30);
begin
tname :=
dbms_sqltune.create_tuning_task(
sql_text=>'select * from scott.dept',
task_name => 'test_tune2'
);
dbms_sqltune.execute_tuning_task('test_tune2');
end;
/
select task_name from user_advisor_log
/
select dbms_sqltune.report_tuning_task('TASK_NAME') from dual
select dbms_sqltune.report_tuning_task('test_tune2') from dual

沒有留言: