plan 19c
Hendrik, February 18, 2022 - 3:26 pm UTC
Hi Chris,
Thanks a lot for your mail.
Unfortunatly .. the chat size here is to small to send a plan and for sure not 2.
Attachment seems to be also not possible.
Any ideas ?
per mail ?
SR created
Hendrik, February 21, 2022 - 9:42 am UTC
Hi Chris,
we have now created a Service Request for this issue.
Kind Regards
Hendrik
February 21, 2022 - 12:18 pm UTC
OK, thanks for letting us know
Same issue for me
Denis JEANNERET, May 05, 2022 - 3:08 pm UTC
Hi,
Then finally, how the issue was fixed ?
Kind regards,
DJE
May 09, 2022 - 2:30 pm UTC
We'll have to see if the OP (Hendrik) comes back with an update.
Oracle CBO at 19c
Hendrik, May 11, 2022 - 4:38 am UTC
Hi Chris,
well ...at the end we created a SQL*Profile for the Query which fixes our problem. I tried the same query several times with an ordered Hint which then was also found by the SQL Tuning Advisor.
I really had the hope, with Oracle 19c, I can get rid of baselines and SQL*Profiles to fix CBO problems.
But yes … let’s wait for the next Oracle Release :-)
Have a great day.
Hendrik
May 11, 2022 - 5:42 am UTC
Baselines are here to stay, because there can never be such a thing as a "perfect optimizer" because that would require an infinite amount of statistics in order to know in advance the best way to run the SQL.
As an aside, I prefer the LEADING hint to ORDERED because you have no constraints over how you write your query
CBO Issue
Hendrik, May 12, 2022 - 11:25 am UTC
just as a summarize of your answer :
Leading Hint did not work.
Had to use ordered which was also recommended by the SQL Tuning Advisor.
SQL Tuning Advisor recommended to use SQL Profiles and not Baseline.
The same query runs properly without hint in 11g. Using Hint means one step back in 19c.
Thanks
May 12, 2022 - 1:29 pm UTC
Thanks for sharing. I don't think the SQL Tuning Advisor recommends baselines - profiles are a way you can get a query to use the "right" plan, then add a baseline to it to lock it in.
Other alternatives...
Rajeshwaran Jeyabal, May 13, 2022 - 4:03 am UTC
Another alternative would be to set OFE at session level to 11.2.0.4 run the queries get the plan and lock them using SPM and post that SPM will evolve over the period of time with the best plans for execution.
May 13, 2022 - 8:45 am UTC
Yes, that could help