DBMS_SQLTUNE.CREATE_TUNING_TASK is created for a particular SQL statement.
SQL> DECLARE
my_task_name VARCHAR2(30);
my_sqltext CLOB;
BEGIN
my_sqltext := select * from maximo.workorder where ((woclass = 'WORKORDER' or woclass = 'ACTIVITY') and contains(description,'%C10192958%') > 0 and historyflag = 0 and istask = 0 and siteid = 'VISTJACK');
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
sql_text => my_sqltext,
user_name => 'MAXIMO',
scope => 'COMPREHENSIVE',
time_limit => 60,
2 3 4 5 6 7 8 9 10 11 task_name => 'TEST_sql_tuning_task',
description => 'Task to tune a query on a specified PRODUCT');
END; 12 13
14