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

    Created Baseline by DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE is ACCEPTED automatically?

    David Berger

      Hello,

       

      An excerpt from the Oracle documentation site:

      http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm

       

      "Information

      ---------

      - 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: 11.2.0.4

       

      Best Regards,

      David