André Spadini | MultiCloud | DBA

André Spadini | MultiCloud | DBA

Oracle: DBMS_SQLTUNE

Oracle: DBMS_SQLTUNE

Subscribe to my newsletter and never miss my upcoming articles

SQL> 
SQL> DECLARE RET_VAL VARCHAR2(4000);
BEGIN
RET_VAL := DBMS_SQLTUNE.CREATE_TUNING_TASK(SQL_ID => '220h01afrssbx',
SCOPE => DBMS_SQLTUNE.SCOPE_COMPREHENSIVE,
TIME_LIMIT => 600,
TASK_NAME => 'SQL_ASPADINI',
DESCRIPTION => 'SQL_ASPADINI');
END;
/

SQL> EXEC DBMS_SQLTUNE.EXECUTE_TUNING_TASK('SQL_ASPADINI');
SQL> SET LONG 9000 PAGESIZE 1000 LINES 200
SQL> COLUMN R FORMAT A100
SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('SQL_ASPADINI') R FROM DUAL;
 
Share this