Re: The science of optimization in practical terms?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: The science of optimization in practical terms?
Дата
Msg-id 603c8f070902180757m15b0bd23ib7256cc8ef44447e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: The science of optimization in practical terms?  (Sam Mason <sam@samason.me.uk>)
Ответы Re: The science of optimization in practical terms?
Список pgsql-hackers
> If the planning was done with some sort of interval then you'd be
> able to encode information about how well your stats characterized the
> underlying data.  Traditionally awkward things like amount of cache
> would serve to drop the lower bound, but not alter the upper.  The
> planner then automatically propagate performance information through the
> calculations, i.e. a nested loop with a tight estimate on a small number
> of rows joined to a table with a wider estimate of a small number of
> rows would keep the low lower bound but the upper-bound would tend to
> make the planner stay away.

Yeah, I thought about this too, but it seems like overkill for the
problem at hand, and as you say it's not clear you'd get any benefit
out of the upper bound anyway.  I was thinking of something simpler:
instead of directly multiplying 0.005 into the selectivity every time
you find something incomprehensible, keep a count of the number of
incomprehensible things you saw and at the end multiply by 0.005/N.
That way more unknown quals look more restrictive than fewer, but
things only get linearly wacky instead of exponentially wacky.

...Robert


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_migrator progress
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Hot standby, recovery infra