From: | "David Johnston" <polobo(at)yahoo(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Questions about "EXPLAIN" |
Date: | 2011-11-15 22:21:05 |
Message-ID: | 030601cca3e4$de2b9190$9a82b4b0$@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey,
PostgreSQL 9.0
1) While comparing a simple GROUP/COUNT query I noticed that TEXT and JSON
formats identify the Top-Level Plan Node differently (GroupAggregate vs.
Aggregate). More curiosity than anything but I would have expected them to
match.
2) For the same query I was hoping to be able to get the defined alias for
the "COUNT" output column but instead the "OUTPUT" simply gives the
expression. Is there some way to get EXPLAIN to output the final column
names or, assuming that this has been discussed previously (likely), could
someone link to one or more threads with the discussion as to why it has not
been done (or give a brief synopsis).
Thanks,
David J.
++++++++++++++++++++++++++++
QUERY PLAN (TEXT) [Sample]
GroupAggregate (cost=4.27..9.64 rows=2 width=64)
Output: sqllibrary_query_name, count(sqllibrary_query_version)
++++++++++++++++++++++++++++
QUERY PLAN (JSON) [Sample]
[
{
"Plan": {
"Node Type": "Aggregate",
"Strategy": "Sorted",
"Startup Cost": 4.27,
"Total Cost": 9.64,
"Plan Rows": 2,
"Plan Width": 64,
"Output": ["sqllibrary_query_name",
"count(sqllibrary_query_version)"],
++++++++++++++++++++++++++++
From | Date | Subject | |
---|---|---|---|
Next Message | J.V. | 2011-11-15 23:38:20 | how to drop function? |
Previous Message | Gavin Flower | 2011-11-15 22:01:28 | Re: partitioning a dataset + employing hysteresis condition |