RE: Sudden plan change related to "VIEW PUSHED PREDICATE" with cost difference of 1M VS 13G
Date: Fri, 13 May 2022 11:04:51 +0000
Message-ID: <781501ef262b4145a8feb66efa9ae130_at_vontobel.com>
Have you considered following action plan?
“
From: Pap <oracle.developer35_at_gmail.com>
Sent: Freitag, 13. Mai 2022 07:21
On Fri, May 13, 2022 at 1:45 AM Noveljic Nenad <nenad.noveljic_at_vontobel.com<mailto:nenad.noveljic_at_vontobel.com>> wrote:
Hello Pap
I revisited my suggestion about column statistics - it was wrong. The low selectivity led to the JPPD transformation cost similar to the one that was in the plan with JPPD.
JPPD: Updated best state, Cost = 39.073380
If we multiply the cost above with the number of rows of the outer query block and add the cost of the outer join query block, we get the total cost of the plan with JPPD. It’s much lower than the plan without JPPD and similar to the cost of the good plan you’ve had previously:
20710 * 39.073380 + ~260K ~ 1M
So JPPD should definitely be selected.
The optimizer figured out that correctly and updated the best state with the cost of JPPD (39.07 is the cost of a single iteration):
JPPD: Updated best state, Cost = 39.073380
But then, it discarded it soon, for still unknown reason:
JPPD: Will not use JPPD from query block SEL$B29E968D
You mentioned that you edited out some lines from the optimizer trace. Are there any lines between the two lines mentioned above (“updated best state” and “Will not use JPPD” that might give the reason for not using JPPD? As already mentioned, the cost isn’t the reason.
If not, the following might be the reason:
A Optimizer applied some heuristics without logging it or
B The correct decision got overridden due to a bug
Could you try following:
Best regards,
Nenad
Important Notice
This message is intended only for the individual named. It may contain confidential or privileged information. If you are not the named addressee you should in particular not disseminate, distribute, modify or copy this e-mail. Please notify the sender immediately by e-mail, if you have received this message by mistake and delete it from your system.
Without prejudice to any contractual agreements between you and us which shall prevail in any case, we take it as your authorization to correspond with you by e-mail if you send us messages by e-mail. However, we reserve the right not to execute orders and instructions transmitted by e-mail at any time and without further explanation.
E-mail transmission may not be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also processing of incoming e-mails cannot be guaranteed. All liability of Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively referred to as "Vontobel Group") for any damages resulting from e-mail use is excluded. You are advised that urgent and time sensitive messages should not be sent by e-mail and if verification is required please request a printed version.
To: Noveljic Nenad <nenad.noveljic_at_vontobel.com>
Cc: Oracle L <oracle-l_at_freelists.org>; Andy Sayer <andysayer_at_gmail.com>; Mohamed Houri <mohamed.houri_at_gmail.com>
Subject: Re: Sudden plan change related to "VIEW PUSHED PREDICATE" with cost difference of 1M VS 13G
Please consider the environment before printing this e-mail.
Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.
-- http://www.freelists.org/webpage/oracle-lReceived on Fri May 13 2022 - 13:04:51 CEST