Is it useful to record whether plans are generic or custom?

Поиск
Список
Период
Сортировка
От Atsushi Torikoshi
Тема Is it useful to record whether plans are generic or custom?
Дата
Msg-id CACZ0uYHZ4M=NZpofH6JuPHeX=__5xcDELF8hT8_2T+R55w4RQw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is it useful to record whether plans are generic or custom?  (legrand legrand <legrand_legrand@hotmail.com>)
Список pgsql-hackers
Hi,

When we run prepared statements, as far as I know, running
EXPLAIN is the only way to know whether executed plans are
generic or custom.
There seems no way to know how many times a prepared
statement was executed as generic and custom.

I think it may be useful to record the number of generic
and custom plans mainly to ensure the prepared statements
are executed as expected plan type.
If people also feel it's useful,  I'm going to think about adding
columns such as 'generic plans' and 'custom plans' to
pg_stat_statements.

As you know, pg_stat_statements can now track not only
'calls' but 'plans', so we can presume which plan type
was executed from them.
When both 'calls' and 'plans' were incremented, plan
type would be custom. When only 'calls' was incremented,
it would be generic.
But considering the case such as only the plan phase has
succeeded and the execution phase has failed, this
presumption can be wrong.

Thoughts?


Regards,

--
Atsushi Torikoshi

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel copy
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] hs_standby_disallowed test fix