From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Non-text EXPLAIN output for partial aggregation |
Date: | 2016-06-26 20:25:24 |
Message-ID: | 16002.1466972724@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I noticed that the EXPLAIN code is set up so that in non-text output
modes, you get output like this for partial-aggregate plans:
"Node Type": "Aggregate", +
"Strategy": "Plain", +
"Operation": "Finalize", +
...
"Node Type": "Aggregate", +
"Strategy": "Plain", +
"Operation": "Partial", +
That is, the "Operation" field type has been commandeered to indicate
partial-aggregation cases. This seems like a pretty bad idea to me,
for two reasons:
1. In other plan node types, "Operation" refers to SQL-visible semantics,
in fact always Select/Insert/Update/Delete. Re-using it for an
implementation detail doesn't seem very consistent.
2. As coded, the field is not printed at all for a non-partial aggregate
node. This is just wrong. A given node type should have a fixed set of
attributes.
I think we should use some other field name, maybe "Step" or
"PartialMode", and have "Simple" or "Plain" as the default field
contents. It's also arguable that this field should distinguish all the
values of the AggSplit enum we just invented, though I'm not sure how
important it is to report serialization options. I'm not wedded to any
particular ideas here, other than that omitting the field in the simple
case is bad.
Comments, naming ideas?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-26 20:28:32 | Re: Rethinking representation of partial-aggregate steps |
Previous Message | David Rowley | 2016-06-26 20:22:38 | Re: Rethinking representation of partial-aggregate steps |