Re: The science of optimization in practical terms?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: The science of optimization in practical terms?
Дата
Msg-id 21655.1234989173@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: The science of optimization in practical terms?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: The science of optimization in practical terms?
Re: The science of optimization in practical terms?
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> ... At any rate, we'd need to save quite
> a bit to pay for carting around best and worst case costs for every
> plan we consider.

Another problem with this is it doesn't really do anything to solve the
problem we were just discussing, namely having an intelligent way of
combining inaccurate estimates for WHERE clauses.  If you just take a
range of plausible values and multiply then it doesn't take very many
clauses to get to a range of [0,1] --- or at least a range of
probabilities wide enough to be unhelpful.

An idea that I think has been mentioned before is to try to identify
cases where we can *prove* there is at most one row emitted by a
sub-path (eg, because of a unique index, DISTINCT subplan, etc).  Then
we could penalize nestloops with outer relations that weren't provably a
single row.  This is basically restricting the notion of estimation
confidence to a special case that's particularly important for SQL.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: The science of optimization in practical terms?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Start background writer during archive recovery.