Re: postgres_fdw: oddity in costing aggregate pushdown paths

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема Re: postgres_fdw: oddity in costing aggregate pushdown paths
Дата
Msg-id 5C2F449C.7010103@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: postgres_fdw: oddity in costing aggregate pushdown paths  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Ответы Re: postgres_fdw: oddity in costing aggregate pushdown paths  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
(2018/12/28 17:28), Etsuro Fujita wrote:
> I noticed that I forgot to modify the cost for evaluating the PathTarget
> for each output row accordingly to this change :(.  Attached is a patch
> for that.

On reflection, I noticed these on estimate_path_cost_size, other than that:

1) In the case of a foreign-grouping path, we failed to adjust the
PathTarget eval cost when using the remote estimates, which I think
would be needed because the PathTarget expressions cannot always be
pre-computed as entries of the fdw_scan_tlist for the foreign-grouping path.

2) We also failed to factor in the eval cost for the foreign-scan and
foreign-join cases, with/without the remote estimates; in the scan/join
cases, the PathTarget might contain PHVs, so the cost of evaluating PHVs
should be charged.  Currently, PHVs are evaluated locally, so the cost
of PHV expressions should also be factored in when using the remote
estimates.

Here is a new version of the patch.

Best regards,
Etsuro Fujita

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: don't create storage when unnecessary
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: commit fest app: Authors