Re: hashagg slowdown due to spill changes - Mailing list pgsql-hackers

From Andres Freund
Subject Re: hashagg slowdown due to spill changes
Date
Msg-id 20200613001226.wpzpw254radq4rkt@alap3.anarazel.de
Whole thread Raw
In response to Re: hashagg slowdown due to spill changes  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: hashagg slowdown due to spill changes
List pgsql-hackers
Hi,

On 2020-06-13 01:06:25 +0200, Tomas Vondra wrote:
> I agree, we should revert 4cad2534da and only project tuples when we
> actually need to spill them.

There are cases where projecting helps for non-spilling aggregates too,
but only for the representative tuple. It doesn't help in the case at
hand, because there's just 5 hashtable entries but millions of rows. So
we're unnecessarily projecting all-5 rows. But when there are many
different groups, it'd be different, because then the size of the
representative tuple can matter substantially.

Do you think we should tackle this for 13? To me 4cad2534da seems like a
somewhat independent improvement to spillable hashaggs.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Next
From: David Rowley
Date:
Subject: Re: Speedup usages of pg_*toa() functions