Thread
-
Precheck to consider path costs for partial paths
Nikita Malakhov <hukutoc@gmail.com> — 2024-12-03T18:24:37Z
Hi hackers! I'd stumbled upon the discussion [1] on TPC-DS query performance, looked into code that caused this behavior and saw that partial hash, merge and nested loop paths are discarded regardless of costs if they have more pathkeys. I've excluded the pathkey chain length condition from the precheck function and added passing precalculated startup cost in addition to total cost, and it seems to produce a more effective plan for case in [1]. Please check the attached patch. I'm very interested if my assumption is correct or not. [1] https://www.postgresql.org/message-id/flat/SEZPR06MB649422CDEBEBBA3915154EE58A232%40SEZPR06MB6494.apcprd06.prod.outlook.com -- Regards, Nikita Malakhov Postgres Professional The Russian Postgres Company https://postgrespro.ru/
-
Re: Precheck to consider path costs for partial paths
Andreas Karlsson <andreas@proxel.se> — 2024-12-16T03:35:50Z
On 12/3/24 7:24 PM, Nikita Malakhov wrote: > Please check the attached patch. I'm very interested if my assumption > is correct or not. Hi, You probably attached the wrong file since your patch does not even compile. Andreas