"Pollard, Mike" <mpollard(at)cincom(dot)com> writes:
> Optimizer hints were added because some databases just don't have a very
> smart optimizer. But you are much better served tracking down cases in
> which the optimizer makes a bad choice, and teaching the optimizer how
> to make a better one.
You more or less missed my entire point.
You can always teach the optimizer to make better decisions based on good
data. Your statement is basically right when talking about tweaking the
optimizer's decisions to ignore its best judgement.
But there are many many cases where the data the optimizer has available isn't
good and for good reason. And in plenty of those cases the data the optimizer
has available *can't* be good.
In the extreme, no amount of added intelligence in the optimizer is going to
help it come up with any sane selectivity estimate for something like
WHERE radius_authenticate(user) = 'OK'
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2005-12-02 07:11:26|
|Subject: Re: Fork-based version of pgbench |
|Previous:||From: Trent Shipley||Date: 2005-12-02 07:06:28|
|Subject: Re: generalizing the planner knobs|