From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Vladimir Churyukin <vladimir(at)churyukin(dot)com> |
Cc: | pghackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Making auto_explain more useful / convenient |
Date: | 2023-11-11 15:49:37 |
Message-ID: | 1552828.1699717777@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Vladimir Churyukin <vladimir(at)churyukin(dot)com> writes:
> Why not have an option to return EXPLAIN results as a NoticeResponse
> instead? That would make its usage more convenient.
That seems quite useless to me, and likely actually counterproductive.
If you are manually investigating query performance, you can just use
EXPLAIN directly. The point of auto_explain, ISTM, is to capture info
about queries issued by automated applications. So something like the
above could only work if you taught every one of your applications to
capture the NOTICE output, separate it from random other NOTICE
output, and then (probably) log it somewhere central for later
inspection. That's a lot of code to write, and at the end you'd
only have effectively duplicated existing tooling such as pgbadger.
Also, what happens in applications you forgot to convert?
> Another thing is tangentially related...
> I think it may be good to have a number of options to generate
> significantly shorter output similar to EXPLAIN. EXPLAIN is great, but
> sometimes people need more concise and specific information, for example
> total number of buffers and reads by certain query (this is pretty common),
> whether or not we had certain nodes in the plan (seq scan, scan of certain
> index(es)), how bad was cardinality misprediction on certain nodes, etc.
Maybe, but again I'm a bit skeptical. IME you frequently don't know
what you're looking for until you've seen the bigger picture. Zeroing
in on details like this could be pretty misleading.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Churyukin | 2023-11-11 16:20:02 | Re: Making auto_explain more useful / convenient |
Previous Message | Andrew Dunstan | 2023-11-11 15:18:51 | Re: pg_basebackup check vs Windows file path limits |