Re: Partitionwise JOIN scanning all partitions, even unneeded ones

From: Dimitrios Apostolou <jimis(at)gmx(dot)net>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Partitionwise JOIN scanning all partitions, even unneeded ones
Date: 2023-08-30 21:52:12
Message-ID: e6ecf09b-d16d-de11-291a-98dfd376692a@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for the clear explanation, and I hope the missing optimisation
gets implemented sooner rather than later. Maybe the query planner should
consider the missing optimisation and ban *hash* partitionwise joins.

Indeed I verified that disabling hash join fixed the situation, with both
queries taking almost the same time. Great!

In the meantime, I'm considering disabling hash joins globally, as I've
had issues with them before (excessive I/O slowing causing much slower
execution than merge join, see [1] for your answer to my question then :).
Do you think that would save me from other problems I'm not aware of,
given the huge size of the table I'm querying?

[1] https://www.postgresql.org/message-id/CAApHDvpPVydoNkEqLyBSbjWq8kq8M7YWdkA44rTeA2MNaO3jsw@mail.gmail.com

Regards,
Dimitris

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pete O'Such 2023-08-31 03:52:35 PG FDW query fails, works local, same credentials
Previous Message David Rowley 2023-08-30 20:56:41 Re: Partitionwise JOIN scanning all partitions, even unneeded ones