pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Jeff Davis <pgsql@j-davis.com>
Subject: Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Date: Thu, 18 Jun 2020 21:20:01 -0500
Message-ID: <20200619022001.GY17995@telsasoft.com> (raw)
In-Reply-To: <CAApHDvpsd7Un=ZGdLPDA4QFEEdtXSoiwTRG8Y3zr5JEFpMfhOA@mail.gmail.com>
References: <CAApHDvpEKbfZa18mM1TD7qV6PG+w97pwCWq5tVD0dX7e11gRJw@mail.gmail.com>
	<20200618134514.GF17995@telsasoft.com>
	<CAApHDvpsd7Un=ZGdLPDA4QFEEdtXSoiwTRG8Y3zr5JEFpMfhOA@mail.gmail.com>

On Fri, Jun 19, 2020 at 02:02:29PM +1200, David Rowley wrote:
> On Fri, 19 Jun 2020 at 01:45, Justin Pryzby <pryzby@telsasoft.com> wrote:
> > 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.
> 
> I imagine you moved "Per-sorted Groups" to a new line due to the lines
> becoming too long? Or was there something else special about that
> property to warrant putting it on a new line?

https://www.postgresql.org/message-id/20200419023625.GP26953@telsasoft.com
|I still think Pre-sorted groups should be on a separate line, as in 0002.
|In addition to looking better (to me), and being easier to read, another reason
|is that there are essentially key=>values here, but the keys are repeated (Sort
|Method, etc).

> postgres=# explain analyze select a,sum(b) from ab group by a;
>  HashAggregate  (cost=175425.12..194985.79 rows=988 width=12) (actual time=1551.920..5281.670 rows=1000 loops=1)
>    Group Key: a
>    Peak Memory Usage: 97 kB Disk Usage: 139760 kB HashAgg Batches: 832

Please be sure to use two spaces between each field !

See earlier discussions (and commits referenced by the Opened Items page).
https://www.postgresql.org/message-id/20200402054120.GC14618@telsasoft.com
https://www.postgresql.org/message-id/20200407042521.GH2228%40telsasoft.com

+                       appendStringInfoChar(es->str, ' ');
+
+               appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT " kB", memPeakKb);
+
+               if (aggstate->hash_batches_used > 0)
+                       appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT " kB HashAgg Batches: %d",

-- 
Justin





view thread (12+ messages)  latest in thread

Message-ID: <20200619022001.GY17995@telsasoft.com>
Permalink:  ../20200619022001.GY17995@telsasoft.com/
Also on:    postgresql.org/message-id/20200619022001.GY17995@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, dgrowleyml@gmail.com, pgsql@j-davis.com
  Subject: Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
  In-Reply-To: <20200619022001.GY17995@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox