Re: query optimiser changes 6.5->7.0

From: Lincoln Yeoh <lylyeoh(at)mecomb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>, Alfred Perlstein <bright(at)wintelcom(dot)net>, Wim Ceulemans <wim(dot)ceulemans(at)nice(dot)be>, Joseph Shraibman <jks(at)selectacast(dot)net>, Simon Hardingham <simon(at)netxtra(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: query optimiser changes 6.5->7.0
Date: 2000-06-05 08:01:35
Message-ID: 3.0.5.32.20000605160135.009005e0@pop.mecomb.po.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 01:09 PM 02-06-2000 -0400, Tom Lane wrote:
>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> They can certainly turn of off before a query and on after the query,
>> right?
>
>Sure, that's how I'd suggest using it at the moment.
>
>> Seems people have been asking for fine-tuned optimizer control.
>
>I know, but I think that's the wrong direction to go in, for the reasons
>I tried to explain. The more specific the command you give to force
>a particular query plan, the more likely that command is to go wrong
>as the situation changes.

True.

But in very many cases the humans do better than the optimizer/planner.

How about a priority/rating/mode for indexes? And we won't have to deal
with legacy SQL statements containing "hints" scattered everywhere...

That's less blunt. But it's still so blunt that it may not be that useful
or work better than the global seq_scan setting.

Is it common for the optimizer to do stupid things? If it is, is there a
way for it to figure out it has done something stupid and to try not to do
it again?

e.g. Ooops, I actually went through 50% of the possible rows this time,
maybe that wasn't such a good idea. Try something else.

Or oops, my cost estimate was really off, revising estimate. I think this
would be preferable- assume the optimizer is not stupid, just ignorant.

Ack, it starts to look like a chess algorithm :).

Cheerio,

Link.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2000-06-05 08:28:41 Re: to pickle or not to pickle
Previous Message Lincoln Yeoh 2000-06-05 07:15:42 Re: index problem