use_remote_estimate usage for join pushdown in postgres_fdw
От | Ashutosh Bapat |
---|---|
Тема | use_remote_estimate usage for join pushdown in postgres_fdw |
Дата | |
Msg-id | CAFjFpRepSC2e3mZ1uYSopJD6R19fOZ0dNNf9Z=gnyKSB6wGk5g@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: use_remote_estimate usage for join pushdown in postgres_fdw
(Robert Haas <robertmhaas@gmail.com>)
|
Список | pgsql-hackers |
Hi All,
postgres_fdw documentation says following about use_remote_estimate (http://www.postgresql.org/docs/devel/static/postgres-fdw.html)--
use_remote_estimate
This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false.
--
I am trying to see, how should we use this option in the context of join pushdown and for
that matter any pushdown involving more than one table.
I came up with following arguments
1. Foreign base relations derive their use_remote_estimate setting either from the server setting or the per table setting. A join between two foreign relations should derive its use_remote_estimate setting from the joining relations (recursively). This means that we will use EXPLAIN to estimate costs of join if "all" the involved base foreign relations have use_remote_estimate true (either they derive it from the server level setting or table level setting).
2. Similar to 1, but use EXPLAIN to estimate costs if "any" of the involved base foreign relations have use_remote_estimate is true.
3. Since join between two foreign relations is not a table level phenomenon, but a server level phenomenon, we should use server level setting. This means that we will use EXPLAIN output to estimate costs of join if the foreign server has use_remote_estimate true, irrespective of the setting for individual foreign relations involved in that join.
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
В списке pgsql-hackers по дате отправления: