Re: Transient plans versus the SPI API

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Transient plans versus the SPI API
Дата
Msg-id 1312502173.21934.9.camel@jdavis-ux.asterdata.local
обсуждение исходный текст
Ответ на Re: Transient plans versus the SPI API  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 2011-08-03 at 12:19 -0400, Tom Lane wrote:
> Of course we could address the worst cases by providing some mechanism
> to tell the plancache code "always use a generic plan for this query"
> or "always use a custom plan".  I'm not entirely thrilled with that,
> because it's effectively a planner hint and has got the same problems
> as all planner hints, namely that users are likely to get it wrong.

I'm not entirely convinced by that. It's fairly challenging for a human
to choose a good plan for a moderately complex SQL query, and its much
more likely that the plan will become a bad one over time. But, in many
cases, a developer knows if they simply don't care about planning time,
and are willing to always replan.

Also, we have a fairly reasonable model for planning SQL queries, but
I'm not sure that the model for determining whether to replan a SQL
query is quite as clear. Simon brought up some useful points along these
lines.

Regards,Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Transient plans versus the SPI API