Re: Speed up Hash Join by teaching ExprState about hashing

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Alexey Dvoichenkov <alexey(at)hyperplane(dot)net>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Speed up Hash Join by teaching ExprState about hashing
Date: 2024-08-17 05:14:10
Message-ID: CAApHDvpuVM43t763Rp6P6QfRh+G+36zVuLRtpdq2+vtdi4CuhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 15 Aug 2024 at 19:50, Alexey Dvoichenkov <alexey(at)hyperplane(dot)net> wrote:
> I gave v3 another look. One tiny thing I've noticed is that you
> removed ExecHashGetHashValue() but not its forward declaration in
> include/executor/nodeHash.h

Fixed

> I also reviewed the JIT code this time, it looks reasonable to
> me. I've added names to some variables to make the IR easier to
> read. (Probably best to squash it into your patch, if you want to
> apply this.)

Thanks. I've included that.

I made another complete pass over this today and I noticed that there
were a few cases where I wasn't properly setting resnull and resvalue
to (Datum) 0.

I'm happy with the patch now. I am aware nothing currently uses
EEOP_HASHDATUM_SET_INITVAL, but I want to get moving with the Hash
Aggregate usages of this code fairly quickly and I'd rather get the
ExprState step code done now and not have to change it again.

v4 patch attached. If nobody else wants to look at this then I'm
planning on pushing it soon.

David

Attachment Content-Type Size
v4-0001-Speed-up-Hash-Join-by-making-ExprStates-support-h.patch application/octet-stream 39.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-08-17 09:32:03 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Previous Message Noah Misch 2024-08-17 04:07:48 Re: race condition in pg_class