Re: WIP Join Removal
| От | Tom Lane |
|---|---|
| Тема | Re: WIP Join Removal |
| Дата | |
| Msg-id | 15301.1220373321@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | WIP Join Removal (Simon Riggs <simon@2ndQuadrant.com>) |
| Список | pgsql-patches |
Simon Riggs <simon@2ndQuadrant.com> writes:
> + if (removable &&
> + joinrel->cheapest_total_path < keeprel->cheapest_total_path)
> + {
> + elog(LOG, "join removed");
> + joinrel->pathlist = keeprel->pathlist;
> + joinrel->joininfo = keeprel->baserestrictinfo;
> + }
> + }
On third thought: if you think that the join paths could possibly win,
then the correct coding here is something like
foreach(path, keeprel->pathlist)
add_path(joinrel, ...)
The reason is that it's not an all-or-nothing choice: some of the paths
might offer cheaper startup cost, or present a useful sort order.
So just present them as available alternatives and let add_path sort it
out.
regards, tom lane
В списке pgsql-patches по дате отправления: