Cost overestimation of foreign JOIN

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Cost overestimation of foreign JOIN
Дата
Msg-id 2b4a65b6-c28c-276c-f66a-e1d71e3d0a86@postgrespro.ru
обсуждение исходный текст
Ответы Re: Cost overestimation of foreign JOIN
Список pgsql-hackers
Hi,

While testing of Asynchronous Append feature with TPC-H queries, I found 
that the push-down JOIN technique is rarely used.
For my servers fdw_tuple_cost = 0.2, fdw_startup_cost = 100.
Exploring the code, i found in postgres_fdw, estimate_path_cost_size(), 
lines 2908,2909:
run_cost += nrows * join_cost.per_tuple;
nrows = clamp_row_est(nrows * fpinfo->joinclause_sel);

Above:
nrows = fpinfo_i->rows * fpinfo_o->rows;

Maybe it is needed to swap lines 2908 and 2909 (see attachment)?

In my case of two big partitioned tables and small join result it 
strongly influenced on choice of the JOIN push-down strategy.

-- 
regards,
Andrey Lepikhov
Postgres Professional

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Autovacuum on partitioned table (autoanalyze)
Следующее
От: Justin Pryzby
Дата:
Сообщение: allow to \dtS+ pg_toast.*