Re: Simple postgresql.conf wizard

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Simple postgresql.conf wizard
Дата
Msg-id 491DC896.7040206@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Simple postgresql.conf wizard  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> "Jonah H. Harris" <jonah.harris@gmail.com> writes:
>> On Fri, Nov 14, 2008 at 11:43 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> IMHO, the only thing worse than an unstable plan is a stable one.
> 
>> Your opinion contradicts the majority of the industry then, I'm
>> afraid.  Like query hints, people are sometimes smarter than the
>> optimizer.
> 
> And, very often, they're not --- or more likely, they were smarter than
> the optimizer last year, but now conditions have changed.  Failing to
> adapt to new conditions is exactly the problem with query hints, and
> in general with any insistence that plans should be "stable".

Those are both very simplistic views. Yes, the planner often knows 
better. Yes, the DBA also often knows better.

Stable plans are by no means a silver bullet. If a table suddenly 
changes dramatically in size, you certainly do want to replan your 
queries. The typical scenario that people want to avoid with stable 
plans is where a table grows slowly, until it reaches a critical point, 
and the planner chooses a different plan, and the new plan happens to be 
very bad. The scary thing about that is that it can happen at an 
unpredictable time, and it can be really hard to convince the planner to 
choose the old plan again.

It's a tradeoff, for sure. Ideally the planner would be infallible. 
Failing that, it would be nice to provide the DBA some tools to control 
when new plans are taken into use.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Synchronous replication patch v2
Следующее
От: "hernan gonzalez"
Дата:
Сообщение: Re: Column reordering in pg_dump