Re: Priority of profile baseline patch

From: Laurentiu Oprea <laurentiu.oprea06_at_gmail.com>
Date: Thu, 16 Dec 2021 21:47:17 +0200
Message-ID: <CA+riqSUEzk7UFNrKZ0FZ=X1DkzpXKaEaM8Rw1T1HkzPFMyRJZQ_at_mail.gmail.com>



Hello Pap,

As far as I remember having a profile and a patch for the same sql_id should not be possible, it will give you an error if you try to create one while the other exists.

I remember I had a problem with a plan baseline that was not picked and somehow the reason was dynamic sampling going crazy. To have a quick fix I created a sql_patch with dynamic_hint(0) then baseline was used every time. This might suggest that the hints in the patch were evaluated first and then the optimizer tried to replicate the plan in the baseline. Possibly this might be valid with sql profiles as well.

I Hope this helps.

În joi, 16 dec. 2021 la 21:27, Pap <oracle.developer35_at_gmail.com> a scris:

> Hello listers, this question is not related to any specific version but a
> general one. As we saw its allowing us to create SQL profile(with copied
> outline) for same sql_id for which plan baselines already exists in both
> enabled and accepted state and vice versa. So wanted to understand is there
> a preference order or priority which oracle follows if we have all of the
> three i.e SQL profile, SQL baseline, SQL patch created for same SQL_id? Or
> it can mix up all these and results into some things unexpected plan so we
> should avoid these multiple options?
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 16 2021 - 20:47:17 CET

Original text of this message