Re: Prepared statements and suboptimal plans

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Prepared statements and suboptimal plans
Дата
Msg-id 10687.1316566832@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Prepared statements and suboptimal plans  (Andy Lester <andy@petdance.com>)
Ответы Re: Prepared statements and suboptimal plans
Список pgsql-performance
Andy Lester <andy@petdance.com> writes:
> On Sep 20, 2011, at 7:36 PM, Tom Lane wrote:
>> 9.2, sorry, not 9.1.  We could use some motivated people testing that
>> aspect of GIT HEAD, though, since I doubt the policy for when to re-plan
>> is quite ideal yet.

> Is motivation and a box enough?  I have motivation, but not knowledge of internals enough to drive testing myself.

Well, you probably don't need much internals knowledge as long as you
can read a little C.  The crux of what I'm worried about is
choose_custom_plan() in src/backend/utils/cache/plancache.c, which is
really pretty simple: decide whether to use a custom (parameter-aware)
plan or a generic (not-parameter-aware) plan.  You might want to shove
some elog() calls in there for tracing purposes so that you can log what
it did, but then it's just a matter of throwing real-world workloads at
it and seeing if it makes good decisions.

            regards, tom lane

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

Предыдущее
От: Andy Lester
Дата:
Сообщение: Re: Prepared statements and suboptimal plans
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Prepared statements and suboptimal plans