我正在尝试从sqlplus运行sql tuning advisor。我按照以下步骤创建
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
sql_id => '19v5guvsgcd1v',
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 60,
task_name => '19v5guvsgcd1v_tuning_task',
description => 'Tuning task for statement 19v5guvsgcd1v.');
DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => '19v5guvsgcd1v_tuning_task');
SET PAGESIZE 10000
SET LINESIZE 20000
SELECT DBMS_SQLTUNE.report_tuning_task('19v5guvsgcd1v_tuning_task') AS recommendations FROM dual;
SET PAGESIZE 24
当我运行创建调优任务块并执行调整任务时,它们已成功完成,但当我尝试查看建议时,我看到空白报告。但是当我从SQL Developer运行sql tuning advisor(sql tuning advisor Icon)时,它提出了2条建议。但是当我在Sqlplus中运行时,为什么我无法看到它。