Forcing Sql plan using Sql Plan baseline for oracle database
I already had another blog for sql profile however at times we have scenario where sql profile is not used and we still see sql plan flip . In such case we have to prefer creating sql plan baseline . There are nany articles online already on sql baselines however i wanted to create my own The use of SQL plan baselines is controlled by the OPTIMIZER_USE_SQL_PLAN_BASELINES parameter, which is set to TRUE by default. Access to the DBMS_SPM package requires the ADMINISTER SQL MANAGEMENT OBJECT privilege. Creating Sql plan baseline using Sql tuning sets : => Drop existing baseline for same sqlid if any BEGIN DBMS_SQLTUNE.DROP_SQLSET (sqlset_name => 'STS_f9948h4y2aa22'); END; / ==> Create new sql plan baseline : BEGIN DBMS_SQLTUNE.CREATE_SQLSET( sqlset_name => 'STS_f9948h4y2aa22', description => 'SQ...