Re: Add ExprState hashing for GROUP BY and hashed SubPlans

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add ExprState hashing for GROUP BY and hashed SubPlans
Date: 2024-10-28 08:51:02
Message-ID: 0cda2059-4a33-4bae-8020-f9859e923718@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/1/24 18:49, David Rowley wrote:
> adf97c156 added support to allow ExprStates to support hashing and
> adjusted Hash Join to make use of that. That allowed a speedup in hash
> value generation as it allowed JIT compilation of hash values. It also
> allowed more efficient tuple deforming as all required attributes are
> deformed in one go rather than on demand when hashing each join key.
>
> The attached does the same for GROUP BY and hashed SubPlans. The win
> for the tuple deformation does not exist here, but there does seem to
> be some gains still to be had from JIT compilation.
>
> Using a scale=1 TPC-H lineitem table, I ran the attached script.
>
> The increase is far from impressive, but likely worth migrating these
> over to use ExprState too.
Having remembered that SQL Server uses lightweight threads to execute
massive hash and aggregate operations in parallel, I think this patch is
promising. Unfortunately, it causes SEGFAULT on 'make check'.

--
regards, Andrei Lepikhov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Motiani 2024-10-28 08:57:03 Re: Inval reliability, especially for inplace updates
Previous Message Amit Kapila 2024-10-28 08:50:03 Re: Pgoutput not capturing the generated columns