Re: Making auto_explain more useful / convenient

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Making auto_explain more useful / convenient
Дата
Msg-id 1552828.1699717777@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Making auto_explain more useful / convenient  (Vladimir Churyukin <vladimir@churyukin.com>)
Ответы Re: Making auto_explain more useful / convenient  (Vladimir Churyukin <vladimir@churyukin.com>)
Список pgsql-hackers
Vladimir Churyukin <vladimir@churyukin.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_basebackup check vs Windows file path limits
Следующее
От: Vladimir Churyukin
Дата:
Сообщение: Re: Making auto_explain more useful / convenient