From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <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-07-08 16:30:21 |
Message-ID: | 20200708163021.GW4107@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 19, 2020 at 02:02:29PM +1200, David Rowley wrote:
> if (es->format == EXPLAIN_FORMAT_TEXT)
> {
> ExplainIndentText(es);
> appendStringInfo(es->str, "Sort Method: %s %s: %ldkB\n",
...
> As for this patch, I don't think it's unreasonable to have the 3
> possible HashAgg properties on a single line Other people might
> disagree, so here's an example of what the patch changes it to:
>
> postgres=# explain analyze select a,sum(b) from ab group by a;
> QUERY PLAN
> --------------------------------------------------------------------------------------------------------------------
> 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
> -> Seq Scan on ab (cost=0.00..72197.00 rows=5005000 width=8) (actual time=0.237..451.228 rows=5005000 loops=1)
I've just noticed another inconsistency:
For "Sort", there's no space before "kB", but your patch (9bdb300d) uses a
space for text mode.
+ 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",
...
+ appendStringInfo(es->str, "Peak Memory Usage: " INT64_FORMAT " kB",
+ memPeakKb);
+
+ if (hash_batches_used > 0)
+ appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT " kB HashAgg Batches: %d",
Hopefully there's the final whitespace inconsistency for this release.
--
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-07-08 16:33:41 | Re: Multi-byte character case-folding |
Previous Message | Alvaro Herrera | 2020-07-08 16:22:04 | Re: TAP tests and symlinks on Windows |