Re: Question of Parallel Hash Join on TPC-H Benchmark

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Ba Jinsheng <bajinsheng(at)u(dot)nus(dot)edu>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Zhang Mingli <zmlpostgres(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Question of Parallel Hash Join on TPC-H Benchmark
Date: 2024-10-12 01:53:19
Message-ID: 978176f8-14a5-4f4d-8925-07d2e7dec4ce@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/10/2024 23:52, Ba Jinsheng wrote:
> Thanks for your replies!
>
>
> I configured these variables and did get a worse query plan:
Could you provide SQL dump and settings to play with this case locally?
I would discover what we need to transform Subplan 1 into a SEMI JOIN.

Also, I usually force parallel workers with settings like below:

max_parallel_workers_per_gather = 32
min_parallel_table_scan_size = 0
min_parallel_index_scan_size = 0
max_worker_processes = 64
parallel_setup_cost = 0.001
parallel_tuple_cost = 0.0001

just to be sure, it's not the case when something down the plan tree
forbids generating a parallel query plan.

P.S.
To discover other options, the AQO extension may be helpful. It stores
cardinalities from all plan nodes after execution and uses them to
calculate selectivities on the subsequent execution.

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2024-10-12 04:13:51 Re: BUG #18652: Planner can not find pathkey item to sort for query with expression and expression index
Previous Message Tom Lane 2024-10-11 20:59:24 Re: BUG #18652: Planner can not find pathkey item to sort for query with expression and expression index