|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Kohei KaiGai <kaigai(at)heterodb(dot)com>|
|Cc:||Pg Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: How to retain lesser paths at add_path()?|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Kohei KaiGai <kaigai(at)heterodb(dot)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
|Next Message||Alvaro Herrera||2019-07-31 15:23:22||Re: Unused header file inclusion|
|Previous Message||Konstantin Knizhnik||2019-07-31 15:05:19||Global temporary tables|