Re: Add ExprState hashing for GROUP BY and hashed SubPlans - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: Add ExprState hashing for GROUP BY and hashed SubPlans
Date
Msg-id 0cda2059-4a33-4bae-8020-f9859e923718@gmail.com
Whole thread Raw
List 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




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Pgoutput not capturing the generated columns
Next
From: Nitin Motiani
Date:
Subject: Re: Inval reliability, especially for inplace updates