From: Dimitrios Apostolou <jimis@gmx.net>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Partitionwise JOIN scanning all partitions, even unneeded ones
Date: Wed, 30 Aug 2023 23:52:12 +0200 (CEST)
Message-ID: <e6ecf09b-d16d-de11-291a-98dfd376692a@gmx.net> (raw)
In-Reply-To: <CAApHDvqSSTV_5ju6U2YbGqeA1xSGnmyy6_TYY+G5KDdS9AtkyA@mail.gmail.com>
References: <704abd8e-5b3e-f946-fb7c-58d39eb1268e@gmx.net>
<CAApHDvqSSTV_5ju6U2YbGqeA1xSGnmyy6_TYY+G5KDdS9AtkyA@mail.gmail.com>
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...
Regards,
Dimitris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: jimis@gmx.net, dgrowleyml@gmail.com
Subject: Re: Partitionwise JOIN scanning all partitions, even unneeded ones
In-Reply-To: <e6ecf09b-d16d-de11-291a-98dfd376692a@gmx.net>
References: <704abd8e-5b3e-f946-fb7c-58d39eb1268e@gmx.net> <CAApHDvqSSTV_5ju6U2YbGqeA1xSGnmyy6_TYY+G5KDdS9AtkyA@mail.gmail.com> <e6ecf09b-d16d-de11-291a-98dfd376692a@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox