Re: [PATCH] Add extra statistics to explain for Nested Loop - Mailing list pgsql-hackers

From e.sokolova@postgrespro.ru
Subject Re: [PATCH] Add extra statistics to explain for Nested Loop
Date
Msg-id 35976aa41e4ca6f7782d336e7758636e@postgrespro.ru
Whole thread Raw
In response to Re: [PATCH] Add extra statistics to explain for Nested Loop  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [PATCH] Add extra statistics to explain for Nested Loop  (Yugo NAGATA <nagata@sraoss.co.jp>)
List pgsql-hackers
Tomas Vondra писал 2020-10-31 04:20:

> seems like an interesting and useful improvement. I did a quick review
> of the patch - attached is a 0002 patch with a couple minor changes 
> (the
> 0001 is just your v1 patch, to keep cfbot happy).

  Thank you for your review and changes!

> 3) In ExplainNode, in the part processing per-worker stats, I think 
> some
> of the fields are incorrectly referencing planstate->instrument instead
> of using the 'instrument' variable from WorkerInstrumentation.

It's correct behavior because of struct WorkerInstrumentation contains 
struct Instrumentation instrument. But planstate->instrument is struct 
Instrumentation too.

> I wonder if we should have another option EXPLAIN option enabling this.
> I.e. by default we'd not collect/print this, and users would have to
> pass some option to EXPLAIN. Or maybe we could tie this to VERBOSE?

It's good idea. Now additional statistics are only printed when we set 
the VERBOSE.

New version of this patch prints extra statistics for all cases of 
multiple loops, not only for Nested Loop. Also I fixed the example by 
adding VERBOSE.

Please don't hesitate to share any thoughts on this topic!
-- 
Ekaterina Sokolova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Add important info about ANALYZE after create Functional Index
Next
From: Eugen Konkov
Date:
Subject: Re: Proposition for autoname columns