Re: Performance of Query 60 on TPC-DS Benchmark

Andrei Lepikhov <lepihov@gmail.com>

From: Andrei Lepikhov <lepihov@gmail.com>
To: Ba Jinsheng <bajinsheng@u.nus.edu>, "pgsql-performance@lists.postgresql.org" <pgsql-performance@lists.postgresql.org>
Date: 2024-11-22T14:32:57Z
Lists: pgsql-performance
On 22/11/2024 18:12, Ba Jinsheng wrote:
> I think the key difference is that the patch disables the usage of Hash 
> Join, which incurs a worse performance.
I see here a problem with a number of groups: when predicting 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