Re: Query Planner not taking advantage of HASH PARTITION

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Benjamin Tingle <ben(at)tingle(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query Planner not taking advantage of HASH PARTITION
Date: 2022-04-17 18:20:24
Message-ID: 2143749.1650219624@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Benjamin Tingle <ben(at)tingle(dot)org> writes:
> Interesting. Why is it impossible to prune hash partitions? Maybe prune
> isn’t the best word, more so use to advantage. At the very least, it should
> be possible to utilize a parallel insert against a table partitioned by
> hash. (Partition query rows, then distribute these rows to parallel workers)

Your plan-shape complaint had nothing to do with insertions; it had
to do with joining the partitioned table to another table. That
join can't be optimized.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-17 18:50:14 Re: Query Planner not taking advantage of HASH PARTITION
Previous Message Benjamin Tingle 2022-04-17 17:07:50 Re: Query Planner not taking advantage of HASH PARTITION