Re: Query Planner not taking advantage of HASH PARTITION - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Query Planner not taking advantage of HASH PARTITION
Date
Msg-id 202204171850.iqpjc2mmr47y@alvherre.pgsql
Whole thread Raw
In response to Query Planner not taking advantage of HASH PARTITION  (Benjamin Tingle <ben@tingle.org>)
Responses Re: Query Planner not taking advantage of HASH PARTITION  (Benjamin Tingle <ben@tingle.org>)
List pgsql-performance
On 2022-Apr-14, Benjamin Tingle wrote:

> It doesn't help if I partition temp_data by textfield beforehand either
> (using the same scheme as the target table). It still opts to concatenate
> all of temp_data, hash it, then perform a sequential scan against the
> target partitions.

Does it still do that if you set
  SET enable_partitionwise_join TO on;
?  If the partition strategies are identical, that might get you a
better plan.  (Actually, in pg13 and upwards the strategies don't need
to be exactly identical, just "compatible".)

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end." (2nd Commandment for C programmers)



pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query Planner not taking advantage of HASH PARTITION
Next
From: Goti
Date:
Subject: How to find the final transformed query in postgresql