Re: Partitionwise JOIN scanning all partitions, even unneeded ones - Mailing list pgsql-general

From Dimitrios Apostolou
Subject Re: Partitionwise JOIN scanning all partitions, even unneeded ones
Date
Msg-id e6ecf09b-d16d-de11-291a-98dfd376692a@gmx.net
Whole thread Raw
In response to Re: Partitionwise JOIN scanning all partitions, even unneeded ones  (David Rowley <dgrowleyml@gmail.com>)
List 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



pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: Partitionwise JOIN scanning all partitions, even unneeded ones
Next
From: "Pete O'Such"
Date:
Subject: PG FDW query fails, works local, same credentials