Re: Simple postgresql.conf wizard

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simple postgresql.conf wizard
Date: 2008-11-14 18:51:02
Message-ID: 491DC896.7040206@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
>> On Fri, Nov 14, 2008 at 11:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Wong 2008-11-14 19:26:00 Re: Simple postgresql.conf wizard
Previous Message hernan gonzalez 2008-11-14 18:37:05 Re: Column reordering in pg_dump