Re: Fix CPU cost of right-semi and right-anti hash joins

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Haibo Yan <tristan(dot)yim(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix CPU cost of right-semi and right-anti hash joins
Date: 2026-08-24 08:35:22
Message-ID: CAMbWs4_Nb9-uL==RAU9aOcG-xWY897wMXML_9SoPR6bCCDhUvA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 22, 2026 at 2:15 AM Haibo Yan <tristan(dot)yim(at)gmail(dot)com> wrote:
> One small testing point: the new hj_small/hj_large cases have no non-hash
> joinqual, so qp_qual_cost.per_tuple is zero and they don’t exercise the new
> v4 branch.

> Also the test comment saying cpu_tuple_cost and qp_qual_cost are both charged
> on inner-side rows is no longer quite true for RIGHT_ANTI in v4.

Right. Fixed.

Attached is v5 of this patch. I plan to push it soon if there are no
objections. It can result in plan changes, so I don't plan to
back-patch it to stable branches. I once thought about pushing it to
v19, but at this late phase of the v19 cycle I'm inclined not to.
Maybe I would have done that if it were June.

Any thoughts are welcome.

- Richard

Attachment Content-Type Size
v5-0001-Fix-CPU-cost-of-right-semi-and-right-anti-hash-jo.patch application/octet-stream 26.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Denis Rodionov 2026-08-24 08:39:37 Re: hashjoins vs. Bloom filters (yet again)
Previous Message Yugo Nagata 2026-08-24 08:32:14 Re: Define MXID acronym in documentation