Re: Simple postgresql.conf wizard

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: 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 15:50:44
Message-ID: 491D9E54.3000902@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jonah H. Harris wrote:
> Oracle already thought of that a long time ago, which is why the plan
> has to come out better for it to take effect.

Huh? We would never willingly choose a worse plan, of course, but the
point is that what looks like a better plan, with a smaller cost
estimate, is sometimes actually worse.

> As for bad plans, you
> obviously haven't used Postgres in production enough to deal with it
> continually changing plans for the worse due to index bloat, data
> skew, phase of the moon, etc. :)

You're right, I haven't, but yes I know that's a problem. We've chatted
about that with Greg sometimes. It would be nice to have more stable
plans. My favorite idea is to stop using the current relation size in
the planner, and use the value snapshotted at ANALYZE instead. That way,
the planner would be completely deterministic, based on the statistics.
Then, we could have tools to snapshot the statistics, move them to a
test system, store them, revert back to old statistics etc.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-14 15:51:57 Re: Block-level CRC checks
Previous Message Chris Browne 2008-11-14 15:50:22 Re: Simple postgresql.conf wizard