Re: Explain: Duplicate key "Workers" in JSON format - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Explain: Duplicate key "Workers" in JSON format
Date
Msg-id 4e6a63b1-0ecf-46e7-5b06-b12059fce89c@2ndQuadrant.com
Whole thread Raw
In response to Explain: Duplicate key "Workers" in JSON format  (Pierre Giraud <pierre.giraud@dalibo.com>)
Responses Re: Explain: Duplicate key "Workers" in JSON format
List pgsql-hackers
On 8/23/19 8:47 AM, Pierre Giraud wrote:
>       "Plans": [
>         {
>           "Node Type": "Sort",
>           "Parent Relationship": "Outer",
>           "Parallel Aware": false,
>           "Actual Startup Time": 1558.638,
>           "Actual Total Time": 2127.522,
>           "Actual Rows": 3333333,
>           "Actual Loops": 3,
>           "Output": ["c1", "c2"],
>           "Sort Key": ["t1.c1"],
>           "Sort Method": "external merge",
>           "Sort Space Used": 126152,
>           "Sort Space Type": "Disk",
>           "Workers": [
>             {
>               "Worker Number": 0,
>               "Sort Method": "external merge",
>               "Sort Space Used": 73552,
>               "Sort Space Type": "Disk"
>             },
>             {
>               "Worker Number": 1,
>               "Sort Method": "external merge",
>               "Sort Space Used": 73320,
>               "Sort Space Type": "Disk"
>             }
>           ],
>           "Workers": [
>             {
>               "Worker Number": 0,
>               "Actual Startup Time": 1487.846,
>               "Actual Total Time": 1996.879,
>               "Actual Rows": 2692973,
>               "Actual Loops": 1
>             },
>             {
>               "Worker Number": 1,
>               "Actual Startup Time": 1468.256,
>               "Actual Total Time": 2012.744,
>               "Actual Rows": 2684443,
>               "Actual Loops": 1
>             }
>           ],


Yes, that's really awful.


...


> I think that the text format should stay as is.
>
> For the JSON format however it would be better in my opinion if
> "Workers" data is merged. Parsing should not imply anything else than
> "var myObj = JSON.parse(theJsonString);".
>
> What do you think?
>

Maybe a simpler fix would be to rename one set of nodes to
"Sort-Workers" or some such.


cheers


andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Next
From: Tom Lane
Date:
Subject: Re: mingw32 floating point diff