Using Baselines

DBMS_SQLTUNE.CREATE_SQLSET();
DBMS_SQLTUNE.SQLSET_CURSOR();
DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY();
DBMS_SQLTUNE.LOAD_SQLSET();
DBMS_SQLTUNE.SELECT_SQLSET();

DBMS_SPM.LOAD_PLANS_FROM_SQLSET();
OR
DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE();

dba_sql_plan_baselines;

Parameters :
OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES
OPTIMIZER_USE_SQL_PLAN_BASELINES

Use basic_filter clause to restrict this sqlset to only one particular sql_id.

Example : BASIC_FILTER => ‘sql_id = ”g3wubsadyrt37”’

Ref :
http://askdba.org/weblog/2011/12/plan-stability-using-sql-profiles-and-sql-plan-management/

https://rnm1978.wordpress.com/2011/06/28/oracle-11g-how-to-force-a-sql_id-to-use-a-plan_hash_value-using-sql-baselines/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s