How to force to use sql profile on 10.2 DB
I have a query running on 10.2 DB and it takes hours to complete. I have a better execution plan whereby i have capture the plan via outline and i use dbms_sqltune.import_sql_profile to import the outline into sql profile. after plan successfully imported into sql profile then i drop the outline to so that query will takes plan from sql profile instead of outline.
I have check the new sql profile, the plan is successfully added and tied with the SQL ID that i want, but the query is not using the new plan. the cost of the new plan is way too high compare to the plan generated by optimizer and i guess this is the reason why sql profile is not been use.