question on auto_explain

2023-08-03 Thread Karsten Hilbert
Dear list, when debugging slow queries in a larger application (https://www.gnumed.de) I started to use auto_explain. The "normal" EXPLAIN warns https://www.postgresql.org/docs/current/sql-explain.html that ANALYZE on INSERT/UPDATE/DELETE will (of course, in hindsight) modify rows. Now, the

Re: question on auto_explain

2023-08-03 Thread David G. Johnston
On Thu, Aug 3, 2023 at 9:29 AM Karsten Hilbert wrote: > https://www.postgresql.org/docs/current/auto-explain.html > > don't explicitely state that it does so, too. Nor can I read impliciteness > that > "normal" EXPLAIN is *run* by auto_explain. > auto_explain automatically produces the explain

Re: question on auto_explain

2023-08-03 Thread Julien Rouhaud
Hi, On Thu, Aug 03, 2023 at 09:45:39PM +0200, Karsten Hilbert wrote: > > > auto_explain automatically produces the explain output of a query that is > > > running for reals.  The effect is identical to running explain analyze > > > except your output > here is whatever the query would produce in

Re: question on auto_explain

2023-08-04 Thread Frédéric Yhuel
On 8/4/23 07:33, Julien Rouhaud wrote: Now, there also seems to be some common misconception about how auto_explain is working, as it's not the first time that I hear people thinking or assuming that it's executing extra EXPLAIN commands. Maybe adding some extra clarification could help, mayb

Re: question on auto_explain

2023-08-04 Thread Karsten Hilbert
Am Fri, Aug 04, 2023 at 01:33:19PM +0800 schrieb Julien Rouhaud: > > explicit hint towards write query side effects. > > The docs says that it automatically shows the execution plans, not that it's > itself doing an EXPLAIN. Yep, so maybe _that_ point warrants being pointed out: that auto_explain

Aw: Re: question on auto_explain

2023-08-03 Thread Karsten Hilbert
> On Thu, Aug 3, 2023 at 9:29 AM Karsten Hilbert > mailto:karsten.hilb...@gmx.net]> wrote: >> >>   >>https://www.postgresql.org/docs/current/auto-explain.html[https://www.postgresql.org/docs/current/auto-explain.html] >> >> don't explicitely state that it does so, too. Nor can I read impliciteness

Aw: Re: question on auto_explain

2023-08-03 Thread Karsten Hilbert
> > auto_explain automatically produces the explain output of a query that is > > running for reals.  The effect is identical to running explain analyze > > except your output > here is whatever the query would produce instead of > > the explain output, which instead goes into the log. > > Than