Tune by SQL Text

Run Tuning Advisor for a SQL Statement

SET long 10000

SET longchunksize 10000

VARIABLE vtask VARCHAR2(100);

EXECUTE :vtask := dbms_sqltune.create_tuning_task(sql_text=>'your sql statement here');

EXECUTE dbms_sqltune.execute_tuning_task(:vtask);

SELECT dbms_sqltune.report_tuning_task(:vtask) FROM dual;