Thread: Re: Add ExprState hashing for GROUP BY and hashed SubPlans

Re: Add ExprState hashing for GROUP BY and hashed SubPlans

From
Andrei Lepikhov
Date:
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




Re: Add ExprState hashing for GROUP BY and hashed SubPlans

From
David Rowley
Date:
On Wed, 11 Dec 2024 at 11:36, David Rowley <dgrowleyml@gmail.com> wrote:
> I've now pushed v7-0001.

... and, after a few comment tweaks, I've also pushed the v7-0002 patch.

Thanks for your reviews, Andrei.

David