Re: Invalid YAML output from EXPLAIN - Mailing list pgsql-bugs
| From | Dean Rasheed |
|---|---|
| Subject | Re: Invalid YAML output from EXPLAIN |
| Date | |
| Msg-id | AANLkTim4sNkHELcgYYrtVOflfIJb4hnQTZGX0At_vMJ7@mail.gmail.com Whole thread Raw |
| In response to | Re: Invalid YAML output from EXPLAIN (Robert Haas <robertmhaas@gmail.com>) |
| Responses |
Re: Invalid YAML output from EXPLAIN
|
| List | pgsql-bugs |
On 9 June 2010 19:50, Robert Haas <robertmhaas@gmail.com> wrote:
> After thinking about this further, I think I'd still like to take one
> more crack at fixing this without quoting absolutely everything. =A0I
> argued against this feature, but we decided to take it, and it seems
> that one of the major arguments that is being put forward is that it
> will be more readable than JSON, because it will have less
> punctuation.
Hmm. Well it's quite subjective, but IMO it's already more readable
than JSON regardless of whether or not values are quoted, simply
because it doesn't have [ ] and { } for lists and maps, which for JSON
adds significantly to the number of lines in longer plans.
Compare
QUERY PLAN
----------------------------------------
- Plan: +
Node Type: Nested Loop +
Join Type: Inner +
Startup Cost: 0.00 +
Total Cost: 57313.15 +
Plan Rows: 4579600 +
Plan Width: 16 +
Plans: +
- Node Type: Seq Scan +
Parent Relationship: Outer +
Relation Name: foo +
Alias: f1 +
Startup Cost: 0.00 +
Total Cost: 31.40 +
Plan Rows: 2140 +
Plan Width: 8 +
- Node Type: Materialize +
Parent Relationship: Inner +
Startup Cost: 0.00 +
Total Cost: 42.10 +
Plan Rows: 2140 +
Plan Width: 8 +
Plans: +
- Node Type: Seq Scan +
Parent Relationship: Outer+
Relation Name: foo +
Alias: f2 +
Startup Cost: 0.00 +
Total Cost: 31.40 +
Plan Rows: 2140 +
Plan Width: 8
with
QUERY PLAN
-----------------------------------------------
[ +
{ +
"Plan": { +
"Node Type": "Nested Loop", +
"Join Type": "Inner", +
"Startup Cost": 0.00, +
"Total Cost": 57313.15, +
"Plan Rows": 4579600, +
"Plan Width": 16, +
"Plans": [ +
{ +
"Node Type": "Seq Scan", +
"Parent Relationship": "Outer", +
"Relation Name": "foo", +
"Alias": "f1", +
"Startup Cost": 0.00, +
"Total Cost": 31.40, +
"Plan Rows": 2140, +
"Plan Width": 8 +
}, +
{ +
"Node Type": "Materialize", +
"Parent Relationship": "Inner", +
"Startup Cost": 0.00, +
"Total Cost": 42.10, +
"Plan Rows": 2140, +
"Plan Width": 8, +
"Plans": [ +
{ +
"Node Type": "Seq Scan", +
"Parent Relationship": "Outer",+
"Relation Name": "foo", +
"Alias": "f2", +
"Startup Cost": 0.00, +
"Total Cost": 31.40, +
"Plan Rows": 2140, +
"Plan Width": 8 +
} +
] +
} +
] +
} +
} +
]
For me, the presence or absence of quotes around the values would make
little difference to the readability, compared to all those brackets.
>=A0While the idea of optimizing a machine-readable format
> for human-readability doesn't typically carry much water around here,
> it's really the only use case for having this particular feature at
> all, so, if we're not going to rip it out, ISTM we ought to respect
> what it's there for. =A0I would be more than willing to agree that if
> one more attempt isn't sufficient to fix the problem then we'll either
> quote everything, or rip the whole thing out.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise Postgres Company
>
pgsql-bugs by date: