Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Date: 2020-06-18 13:45:14
Message-ID: 20200618134514.GF17995@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 18, 2020 at 03:37:21PM +1200, David Rowley wrote:
> Now that HashAgg can spill to disk, we see a few more details in
> EXPLAIN ANALYZE than we did previously, e.g. Peak Memory Usage, Disk
> Usage. However, the new code neglected to make EXPLAIN ANALYZE show
> these new details for parallel workers.
>
> Additionally, the new properties all were using
> ExplainPropertyInteger() which meant that we got output like:
>
> Group Key: a
> Peak Memory Usage: 97 kB
> Disk Usage: 3928 kB
> HashAgg Batches: 798
>
> Where all the properties were on a line by themselves. This does not
> really follow what other nodes are doing, e.g sort:
>
> -> Sort (actual time=47.500..59.344 rows=100000 loops=1)
> Sort Key: a
> Sort Method: external merge Disk: 2432kB
>
> Where we stick all the properties on a single line.

Note that "incremental sort" is also new, and splits things up more than sort.

See in particular 6a918c3ac8a6b1d8b53cead6fcb7cbd84eee5750, which splits things
up even more.

-> Incremental Sort (actual rows=70 loops=1)
Sort Key: t.a, t.b
Presorted Key: t.a
- Full-sort Groups: 1 Sort Method: quicksort Memory: avg=NNkB peak=NNkB Presorted Groups: 5 Sort Methods: top-N heapsort, quicksort Memory: avg=NNkB peak=NNkB
+ Full-sort Groups: 1 Sort Method: quicksort Average Memory: NNkB Peak Memory: NNkB
+ Pre-sorted Groups: 5 Sort Methods: top-N heapsort, quicksort Average Memory: NNkB Peak Memory: NNkB

That's not really a "precedent" and I don't think that necessarily invalidates
your change.

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2020-06-18 14:09:41 Re: Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute
Previous Message vignesh C 2020-06-18 13:30:57 Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute