Re: Fwd: Planning time is time-consuming

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Fwd: Planning time is time-consuming
Дата
Msg-id b5341fc8036b969c90106a26e78b195c5cf07e34.camel@cybertec.at
обсуждение исходный текст
Ответ на Fwd: Planning time is time-consuming  (Mikhail Balayan <mv.balayan@gmail.com>)
Ответы Re: Planning time is time-consuming  (Frits Hoogland <frits.hoogland@gmail.com>)
Список pgsql-performance
On Mon, 2023-09-11 at 12:57 +0800, Mikhail Balayan wrote:
> Thanks for the idea. I was surprised to find that this is not the way it works and the planning time remains the
same.

To benefit from the speed gains of a prepared statement, you'd have to execute it
at least seven times.  If a generic plan is used (which should happen), you will
see $1 instead of the literal argument in the execution plan.

Prepared statements are probably your best bet.

Yours,
Laurenz Albe



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

Предыдущее
От: Mikhail Balayan
Дата:
Сообщение: Fwd: Planning time is time-consuming
Следующее
От: David Rowley
Дата:
Сообщение: Re: Planning time is time-consuming