SQL Baseline not used.

  • From: Bala Krishna <krishna000@xxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 21 Nov 2014 21:29:32 -0500

Hi All,

I've created a tuning task

dbms_sqltune.create_tuning_task(task_name=>'&&Task_name',
sql_id=>'&sql_id', time_limit=>&time_limit);

Tuning Task reported to create a sql plan baseline, i've created that but
only for the first time it used and executed fast. For the next run it
created a different plan_hash_value and may be because of that Sql Baseline
not used.

I've not fixed Sql Baseline that i have created it.

Can somebody please answer me following questions.

1.If the cached SQL in shared pool flushes out will it not use created SQL
Baseline anymore?
2.I have to fix the plan permanently irrespective of Gather Stats ran on
the underlying tables weekly or whatever the reason i'd like to fix the
plan that has given the proven results.
3.How do i retrive the plan and fix it for permanent use.

Regards
Bala

Other related posts: