Sql tunning advisor
3x3mdd5f4tkfz
SET SERVEROUTPUT ON
-- Tuning task created for specific a statement from the AWR.
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
-- begin_snap => 12950,
-- end_snap => 12955,
sql_id => '3x3mdd5f4tkfz',
-- PLAN_HASH_VALUE => 1532391233,
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 240,
task_name => '3x3mdd5f4tkfz_tuning_task',
description => 'Tuning task for statement 3x3mdd5f4tkfz in AWR.');
DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/
-- Execute task:
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => '3x3mdd5f4tkfz_tuning_task');
-- To view findings:
SET LONG 9999999 LONGCHUNKSIZE 9999999 LINESIZE 1111 PAGESIZE 0 TRIM ON TRIMSPOOL ON ECHO ON FEEDBACK ON
COLUMN sql_text FORMAT A150 wrap
select DBMS_SQLTUNE.report_tuning_task('3x3mdd5f4tkfz_tuning_task') from dual;
execute dbms_sqltune.accept_sql_profile(task_name =>'3x3mdd5f4tkfz_tuning_task', task_owner => 'SYS', replace =>TRUE, profile_type => DBMS_SQLTUNE.PX_PROFILE);
set timing on
select * from TLM_DBO.V_REALTIME_NAV_PROOF where CORR_ACC_NO =100000048;
replace the SQLID with your SQLID and execute to generate Advisory Plan,
And apart few other Reports can help to find whcih plan is suitable for your Query
1- @?/rdbms/admin/sqltrpt.sql
2- @?/rdbms/admin/addmrpt.sql
3x3mdd5f4tkfz
SET SERVEROUTPUT ON
-- Tuning task created for specific a statement from the AWR.
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
-- begin_snap => 12950,
-- end_snap => 12955,
sql_id => '3x3mdd5f4tkfz',
-- PLAN_HASH_VALUE => 1532391233,
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 240,
task_name => '3x3mdd5f4tkfz_tuning_task',
description => 'Tuning task for statement 3x3mdd5f4tkfz in AWR.');
DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/
-- Execute task:
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => '3x3mdd5f4tkfz_tuning_task');
-- To view findings:
SET LONG 9999999 LONGCHUNKSIZE 9999999 LINESIZE 1111 PAGESIZE 0 TRIM ON TRIMSPOOL ON ECHO ON FEEDBACK ON
COLUMN sql_text FORMAT A150 wrap
select DBMS_SQLTUNE.report_tuning_task('3x3mdd5f4tkfz_tuning_task') from dual;
execute dbms_sqltune.accept_sql_profile(task_name =>'3x3mdd5f4tkfz_tuning_task', task_owner => 'SYS', replace =>TRUE, profile_type => DBMS_SQLTUNE.PX_PROFILE);
set timing on
select * from TLM_DBO.V_REALTIME_NAV_PROOF where CORR_ACC_NO =100000048;
replace the SQLID with your SQLID and execute to generate Advisory Plan,
And apart few other Reports can help to find whcih plan is suitable for your Query
1- @?/rdbms/admin/sqltrpt.sql
2- @?/rdbms/admin/addmrpt.sql
No comments:
Post a Comment