Re: How to retain lesser paths at add_path()?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to retain lesser paths at add_path()?
Дата
Msg-id 2840.1564585637@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to retain lesser paths at add_path()?  (Kohei KaiGai <kaigai@heterodb.com>)
Ответы Re: How to retain lesser paths at add_path()?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Kohei KaiGai <kaigai@heterodb.com> writes:
> When we add a new path using add_path(), it checks estimated cost and path-keys,
> then it also removes dominated paths, if any.
> Do we have a reasonable way to retain these "dominated" paths? Once it
> is considered
> lesser paths at a level, however, it may have a combined cheaper cost
> with upper pathnode.

You do *not* want to have add_path fail to remove dominated paths in
general.  Don't even think about it, because otherwise you will have
plenty of time to regret your folly while you wait for the planner
to chew through an exponential number of possible join plans.

What you'd want to do for something like the above, I think, is to
have some kind of figure of merit or other special marking for paths
that will have some possible special advantage in later planning
steps.  Then you can teach add_path that that's another dimension it
should consider, in the same way that paths with different sort orders
or parallizability attributes don't dominate each other.

            regards, tom lane



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Global temporary tables
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Unused header file inclusion