DBA Hub

📋Steps in this guide1/1

sql tuning advisor for sql_id

Create tuning task:

oracle configurationintermediate
by OracleDba
12 views
1

sql tuning advisor for sql_id

Create tuning task: Execute tuning task: Get the tuning advisory report

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
sql_id => '12xca9smf3hfy',
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 500,
task_name => '12xca9smf3hfy_tuning_task',
description => 'Tuning task1 for statement 12xca9smf3hfy');
DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => '12xca9smf3hfy_tuning_task');
set long 65536
set longchunksize 65536
set linesize 100
select dbms_sqltune.report_tuning_task('12xca9smf3hfy_tuning_task') from dual;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!