We have an C# app which will search the DB for activity in a couple of tables. The user can specify to search for certain criteria, which in turn build upon the base SQL query.
This query takes a very long time to execute and we wanted to use Oracle's Tuning Advisor on this query. Our question is if this tuning advisor will only work for the given query?
For example, if we do the tuning for applications the base query (they don't specify any search criteria):
SELECT Actv, FullName, DOB FROM Pers;
Does the created SQL Profile only apply to that statement? What if they specify search criteria so the statement grows to:
SELECT Actv, FullName, DOB FROM Pers WHERE Actv = 'Foo' AND DOB >= :Date;
Would we need to create an another SQL profile for this query or would the optimizer used part of the baseline SQL Profile in it's creation of the execution plan?