0

Im creating a Sql Baseline for a particular Sql Statement, I do know Sql Profile works for a particular Sql_Id is it the same way for Sql Baseline

In other words if Sql_id changed for sql statement on every execution will the Sql Baseline help to make oracle use a particular plan

1 Answers1

0

SQL Profiles can work for other sql_id's provided they have the same force_match_signature and you use "force_match => true" in the accept sql profile command. SQL Statements will have the same force_match_signature if they differ in say, substitution variables or other minor changes that don't actually change it semantically [roughly speaking].

A SQL Plan Baseline will only work for that same exact SQL_ID, and then, only if the optimizer can generate the plan_hash_value for that SQL given the present operating conditions when the SQL is parsed.

Roger Cornejo
  • 1,507
  • 1
  • 8
  • 7