Re: generalizing the planner knobs

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: generalizing the planner knobs
Дата
Msg-id 87d5kgf002.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: generalizing the planner knobs  ("Pollard, Mike" <mpollard@cincom.com>)
Ответы Re: generalizing the planner knobs  (Rod Taylor <pg@rbt.ca>)
Список pgsql-hackers
"Pollard, Mike" <mpollard@cincom.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'

-- 
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Trent Shipley
Дата:
Сообщение: Re: generalizing the planner knobs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Fork-based version of pgbench