Re: An Idea for planner hints

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Subject: Re: An Idea for planner hints
Date: 2006-08-09 09:38:10
Message-ID: 1155116290.21451.235.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2006-08-08 at 22:14, Tom Lane wrote:
> So some kind of override for statistical guesses doesn't seem completely
> silly to me. But it needs to be declarative information that's stored
> somewhere out of view of the actual SQL queries. IMHO anyway.

The real problem is that sometimes there's no way to get a better plan
without some code change in the planner. And given the postgres release
policy, that might be as far as 1 year away for a normal user... of
course it's open source, you can patch, but would I trust a patch which
is not tested by the community ? So mostly I can't wait for code
changes, and then a generic tool to fix _now_ the one bad query which
brings my system down would be nice. This is why hints would be nice, to
quick-fix immediate problems. Of course they can and would be abused, as
anything else.

On the planner improvements part, would it be possible to save
statistics about join criteria between tables ? I'm not sure where that
would belong, but I guess it would be possible to have a special kind of
ANALYZE which analyzes multiple tables and their correlations... this
way the user would not need to hard-code the statistics hints, but the
system could generate them.

Cheers,
Csaba.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2006-08-09 09:48:41 Re: proposal for PL packages for 8.3.
Previous Message Gourish Singbal 2006-08-09 09:26:53 Fwd: unsubscribe