8 Replies Latest reply on Dec 3, 2013 9:34 AM by David Berger

    Created Baseline by DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE is ACCEPTED automatically?

    David Berger



      An excerpt from the Oracle documentation site:





      - The Original Plan appears to have the best performance, based on the elapsed time per execution.

        However, if you know that one alternative plan is better than the Original Plan, you can create a SQL plan baseline for it.

        This will instruct the Oracle optimizer to pick it over any other choices in the future.

        execute dbms_sqltune.create_sql_plan_baseline(task_name => 'TASK_XXXXX', object_id => 2, task_owner => 'SYS', plan_hash => xxxxxxx);


      To adopt an alternative plan regardless of whether SQL Tuning Advisor recommends it, call DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE. You can use this procedure to create a SQL plan baseline on any existing reproducible plan."


      It is not clearly described whether the function "DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE" called creates the sql plan baseline in the state of "ACCEPTED" automatically or it needs to be evolved after the creation with the evolve process?


      Could you please help me with answering my question?


      Oracle Product Version:


      Best Regards,