Re: Optimizing the same PREPAREd static query (without parameters)

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Optimizing the same PREPAREd static query (without parameters)
Дата
Msg-id CAKJS1f-oH6BOMgfDMveMd69TDuaxVn8eK0+eWmBv1s9bDmPV-g@mail.gmail.com
обсуждение исходный текст
Ответ на Optimizing the same PREPAREd static query (without parameters)  (Mitar <mmitar@gmail.com>)
Ответы Re: Optimizing the same PREPAREd static query (without parameters)  (Mitar <mmitar@gmail.com>)
Список pgsql-general
On Mon, 7 Jan 2019 at 18:54, Mitar <mmitar@gmail.com> wrote:
> If I have a PREPAREd query without parameters (static) and I EXECUTE
> it repeatedly in the same session, does PostgreSQL learn/optimize
> anything across those runs?

Yes, it will generate the query plan on the first invocation of
EXECUTE and use that plan for all subsequent EXECUTEs for the session
until you DEALLOCATE the prepared query or DISCARD PLANS/ALL;

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: Use bytearray for blobs or not?
Следующее
От: Mitar
Дата:
Сообщение: Re: Optimizing the same PREPAREd static query (without parameters)