Hi!
Please check the following proposal (patch in attach).
The main idea is to reject only obviously worse paths (costs considerably
more
than compared one), and to pass pre-calculated startup cost to precheck
function
for more accurate comparison.
>
> --
Regards,
Nikita Malakhov
Po
dicting it
> incorrectly, Postgres doesn't use the Memoize node. Disabling HashJoin
> puts NestLoop+Memoize at the place of the best path, which is chosen later.
> Unfortunately, we can't see a prediction on the number of groups in
> Memoize and can only guess the issue.
>
> --
> regards, Andrei Lepikhov
>
>
>
>
>
>
--
Regards,
--
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
https://postgrespro.ru/