Wednesday, December 12, 2018
Tuning Advisor on sql from backend
below are the steps to run Tuning Advisor on sql_id
DECLARE
my_task_name VARCHAR2(30);
begin
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => '&sql_id',scope => 'COMPREHENSIVE',time_limit =>7200,task_name => 'STA:1t05z5qh0u707',description => 'description_ax');
end;
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'STA:1t05z5qh0u707');
SET LONG 10000
SET PAGESIZE 1000
SET LINESIZE 200
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('STA:1t05z5qh0u707') from dual;
Index on Table
Index on Table
select
b.uniqueness, a.index_name, a.table_name, a.column_name
from all_ind_columns a, all_indexes b
where a.index_name=b.index_name
and a.table_name = upper('&table_name')
order by a.table_name, a.index_name, a.column_position;
select
b.uniqueness, a.index_name, a.table_name, a.column_name
from all_ind_columns a, all_indexes b
where a.index_name=b.index_name
and a.table_name = upper('&table_name')
order by a.table_name, a.index_name, a.column_position;
Subscribe to:
Posts (Atom)