From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Missing HashAgg EXPLAIN ANALYZE details for parallel plans |
Date: | 2020-06-18 03:37:21 |
Message-ID: | CAApHDvpEKbfZa18mM1TD7qV6PG+w97pwCWq5tVD0dX7e11gRJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
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:
QUERY PLAN
---------------------------------------------------------------------
HashAggregate (actual time=31.724..87.638 rows=1000 loops=1)
Group Key: a
Peak Memory Usage: 97 kB
Disk Usage: 3928 kB
HashAgg Batches: 798
-> Seq Scan on ab (actual time=0.006..9.243 rows=100000 loops=1)
Where all the properties were on a line by themselves. This does not
really follow what other nodes are doing, e.g sort:
QUERY PLAN
---------------------------------------------------------------------------
GroupAggregate (actual time=47.530..70.935 rows=1000 loops=1)
Group Key: a
-> Sort (actual time=47.500..59.344 rows=100000 loops=1)
Sort Key: a
Sort Method: external merge Disk: 2432kB
-> Seq Scan on ab (actual time=0.004..8.476 rows=100000 loops=1)
Where we stick all the properties on a single line.
The attached patch fixes both the missing parallel worker information
and puts the properties on a single line for format=text.
I'd like to push this in the next few days.
David
Attachment | Content-Type | Size |
---|---|---|
hashagg_explain_fix.patch | application/octet-stream | 11.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-06-18 03:56:16 | Re: Creating a function for exposing memory usage of backend process |
Previous Message | Tatsuo Ishii | 2020-06-18 03:30:41 | Re: Transactions involving multiple postgres foreign servers, take 2 |