Re: Avoiding bad prepared-statement plans.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Avoiding bad prepared-statement plans.
Дата
Msg-id 603c8f071002260854v69716cfdw5f28cc76a167d0b6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoiding bad prepared-statement plans.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Avoiding bad prepared-statement plans.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Feb 26, 2010 at 11:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Also, I think there is a lot of confusion here over two different
> issues: generic plan versus parameter-specific plan, and bad planner
> estimates leading to a wrong plan choice.  While the latter is certainly
> an issue sometimes, there is no reason to believe that it affects
> prepared statements worse than non-prepared ones.  So I think that
> designing a fix for prepared statements on the assumption that you can't
> trust the planner's estimates is solving the wrong problem.

The two issues seem intimately connected to me.  Of course, estimates
can be inaccurate for many reasons, but ONE of those reasons is that
the planner is optimizing for an unknown parameter value which has
very different distribution from the actually supplied value.

...Robert


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Avoiding bad prepared-statement plans.
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: ecpg tests broken by pgindent run