Re: Multi-pass planner

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Multi-pass planner
Дата
Msg-id CA+TgmoYLpVpHVS3pkiKQYn+v=MKA+m0z9KZVtGSf70xGGD+D=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Multi-pass planner  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: Multi-pass planner  (Amit Kapila <amit.kapila@huawei.com>)
Список pgsql-hackers
On Thu, Apr 4, 2013 at 2:53 PM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> for estimate_worstcase_fraction.  So, when computing the cost of a
>> path, we'd compute our current expected-case estimate, and also a
>> worst-case estimate, and then compute the final cost as:
>
> There also was the idea for the executor to be able to handle alternate
> plans and some heuristic to determine that the actual cost of running a
> plan is much higher than what's been estimated, so much so as to switch
> to starting from scratch with the other plan instead.

Yeah.  The thing is, if the plan has any side effects, that's not
really an option.  And even if it doesn't, it may throw away a lot of
work.  One thing we could do is switch from a unparameterized nested
loop to a hash join if the outer side turns out to be much larger than
expected, but that's only going to benefit a pretty narrow set of use
cases.  Which is why I think a planner-based approach is probably more
promising.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Hash Join cost estimates
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hash Join cost estimates