mirror of
https://github.com/postgres/postgres.git
synced 2025-06-19 04:21:08 +03:00
postgres_fdw: Push down joins to remote servers.
If we've got a relatively straightforward join between two tables, this pushes that join down to the remote server instead of fetching the rows for each table and performing the join locally. Some cases are not handled yet, such as SEMI and ANTI joins. Also, we don't yet attempt to create presorted join paths or parameterized join paths even though these options do get tried for a base relation scan. Nevertheless, this seems likely to be a very significant win in many practical cases. Shigeru Hanada and Ashutosh Bapat, reviewed by Robert Haas, with additional review at various points by Tom Lane, Etsuro Fujita, KaiGai Kohei, and Jeevan Chalke.
This commit is contained in:
@ -486,6 +486,16 @@
|
||||
be <literal>IMMUTABLE</> as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When <filename>postgres_fdw</> encounters a join between foreign tables on
|
||||
the same foreign server, it sends the entire join to the foreign server,
|
||||
unless for some reason it believes that it will be more efficient to fetch
|
||||
rows from each table individually, or unless the table references involved
|
||||
are subject to different user mappings. While sending the <literal>JOIN</>
|
||||
clauses, it takes the same precautions as mentioned above for the
|
||||
<literal>WHERE</> clauses.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The query that is actually sent to the remote server for execution can
|
||||
be examined using <command>EXPLAIN VERBOSE</>.
|
||||
|
Reference in New Issue
Block a user