Select * From Table(dbms_xplan.display_cursor(sql_id => ‘9s7pt2ay4t3jg‘));
Declare
l_Result_Name Varchar2(30);
l_Task_Name Varchar2(36) := ‘Task_Name_9s7pt2ay4t3jg_1‘;
l_Sqlid Varchar2(36) := ‘9s7pt2ay4t3jg‘;
Begin
l_Result_Name := Dbms_Sqltune.Create_Tuning_Task(Sql_Id => l_Sqlid,
Scope => ‘COMPREHENSIVE‘,
Time_Limit => 60,
Task_Name => l_Task_Name,
Description => ‘Task to tune a query on a specified table‘);
Dbms_Sqltune.Set_Tuning_Task_Parameter(Task_Name => l_Task_Name,
Parameter => ‘TIME_LIMIT‘,
Value => 30);
Dbms_Sqltune.Execute_Tuning_Task(Task_Name => l_Task_Name);
End;
Select Dbms_Sqltune.Report_Tuning_Task(‘Task_Name_4hqjc3gc4dwuy‘) From Dual;
Select Dbms_Sqltune.Report_Tuning_Task(‘Task_Name_5k5fc0v3hkmcr‘) From Dual;
Select Dbms_Sqltune.Report_Tuning_Task(‘Task_Name_au085h9cz2av0‘) From Dual;
Select Dbms_Sqltune.Report_Tuning_Task(‘Task_Name_cwkna4v8r99qu‘) From Dual;
Select Dbms_Sqltune.Report_Tuning_Task(‘Task_Name_9s7pt2ay4t3jg_1‘) From Dual;
Select * From dba_sql_profiles;
Select * From wh_inventory y Where y.isshort =‘Y‘