Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Date
Msg-id 20200618134514.GF17995@telsasoft.com
Whole thread Raw
In response to Missing HashAgg EXPLAIN ANALYZE details for parallel plans  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
List 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



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute
Next
From: Bharath Rupireddy
Date:
Subject: Re: Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute