Re: Automatic function replanning

Поиск
Список
Период
Сортировка
От Lukas Kahwe Smith
Тема Re: Automatic function replanning
Дата
Msg-id 43AB1A66.70305@pooteeweet.org
обсуждение исходный текст
Ответ на Automatic function replanning  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: Automatic function replanning
Список pgsql-hackers
Bruce Momjian wrote:

> Right, if the cardinality changes, you realize this before execution and
> optimize/save the plan again.  A further optimization would be to save
> _multiple_ plans for a single prepared plan based on constants and
> choose one of the other, but that is beyond where we are willing to
> consider at this stage, I think.

ok .. so you store the cardinality that was used when generating the
original plan. on the next execution you look up the cardinality again
and compare it, if its off too much, you replan. however this could in
extreme cases mean that you replan on every execution and thereby
killing off the entire advantage of storing the plan. but thats the
absolute worse case scenario.

regards,
Lukas

PS: bruce original email was only send to me directly ..






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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Automatic function replanning
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Function call with offset and limit