Subject: [pgAdmin][RM4335] Add EXPLAIN option SETTINGS and SUMMARY

From: Aditya Toshniwal <[email-masked]>
Date: Wed, 26 Jun 2019 17:28:48 +0530

Hi Hackers,

Attached is the patch to add support for SETTINGS(v12+) and SUMMARY(v10+)
explain options. These options will be visible only if version is supported.

I have also created and fixed RM4395. The explain options changed on one
query tool should not change explain options on other query tools or
preferences. The initial values will be taken from preferences are usual.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

---

From: Dave Page <[email-masked]>
Date: Wed, 26 Jun 2019 10:52:35 -0400

Hi

Something isn't working correctly - I turned on the summary option, and
this is the query that was run when I hit the EXPLAIN button:

EXPLAIN (FORMAT JSON,ANALYZE False,VERBOSE False,COSTS False,TIMING
False,SUMMARY False,BUFFERS False) select * from pg_tables

Aside from the formatting (s/True/true, s/False/false, missing spaces etc),
shouldn't it say SUMMARY true? I've cleared the browser and bundle caches,
rebundled etc.

Shouldn't there also be documentation updates?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Aditya Toshniwal <[email-masked]>
Date: Thu, 27 Jun 2019 10:01:24 +0530

Hi,

> Aside from the formatting (s/True/true, s/False/false, missing spaces
> etc), shouldn't it say SUMMARY true? I've cleared the browser and bundle
> caches, rebundled etc.
>
I think I misunderstood the documents -
https://www.postgresql.org/docs/12/sql-explain.html. Few of the parameters
are applicable only to EXPLAIN ANALYSE and not to EXPLAIN. Will make the
changes, along with formatting to existing codes as well.

> Shouldn't there also be documentation updates?
Yeah. (I always miss that :/)

---

From: Dave Page <[email-masked]>
Date: Thu, 27 Jun 2019 07:19:17 -0400

Hi

On Thu, Jun 27, 2019 at 12:32 AM Aditya Toshniwal <
[email-masked]> wrote:

> https://www.postgresql.org/docs/12/sql-explain.html. Few of the
> parameters are applicable only to EXPLAIN ANALYSE and not to EXPLAIN. Will
> make the changes, along with formatting to existing codes as well.
>

I'm not sure that explains why the summary option is set to *false* for an
EXPLAIN action, but anyway, please make sure it works :-)

>>> Attached is the patch to add support for SETTINGS(v12+) and
>>> SUMMARY(v10+) explain options. These options will be visible only if
>>> version is supported.
>>>

---

From: Aditya Toshniwal <[email-masked]>
Date: Fri, 28 Jun 2019 18:56:37 +0530

Hi Hackers,

Attached is the updated patch to fix the review comments of trailing mail.
Kindly review.

On Thu, Jun 27, 2019 at 4:49 PM Dave Page <[email-masked]> wrote:

>>>> I have also created and fixed RM4395. The explain options changed on
>>>> one query tool should not change explain options on other query tools or

---

From: Dave Page <[email-masked]>
Date: Fri, 28 Jun 2019 12:45:44 -0400

Hi

> Attached is the updated patch to fix the review comments of trailing mail.

So where is the summary supposed to be displayed? It's now requesting it
from the server, and it's in the JSON response, but isn't displayed
anywhere that I can see.

>> I'm not sure that explains why the summary option is set to *false* for
>> an EXPLAIN action, but anyway, please make sure it works :-)
>>
>>
>>>

---

From: Aditya Toshniwal <[email-masked]>
Date: Tue, 2 Jul 2019 13:07:25 +0530

Hi Hackers,

Attached is the updated patch. The SUMMARY data will be visible on hover
over the top-right icon along JIT stats and Triggers (if any).
I'm not sure where does SETTINGS data come in plan output for PGv12. But
the query is executed with correct options if required.
Docs updated.

Also, I have fixed a tooltip flickering issue with this patch (#4224)

Kindly review.

On Fri, Jun 28, 2019 at 10:15 PM Dave Page <[email-masked]> wrote:

>>>>> Something isn't working correctly - I turned on the summary option,
>>>>> and this is the query that was run when I hit the EXPLAIN button:
>>>>>

---

From: Dave Page <[email-masked]>
Date: Wed, 3 Jul 2019 13:58:17 +0100

Thanks, applied.