postgres_fdw:可以将数据推送到外部服务器进行联接吗? [英] postgres_fdw: possible to push data to foreign server for join?

查看:121
本文介绍了postgres_fdw:可以将数据推送到外部服务器进行联接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个查询

select * from remote_table
   join local_table using(common_key)

其中remote_table是 FOREIGN TABLE ,其中 postgres_fdw local_table 是常规表。

where remote_table is a FOREIGN TABLE with postgres_fdw and local_table is a regular table.

local_table 很小(100行),而 remote_table 很大(行数百万)。

local_table is small (100 rows) and remote_table is large (millions of rows).

看起来像将远程表整体拉出并本地连接,这样可以将较小的表发送到远程服务器并远程加入。

It looks like the remote table is pulled in its entirety and joined locally, when it would be more efficient to ship the smaller table to the remote server and join remotely.

有没有办法使postgres_fdw做到​​这一点?

Is there a way to get postgres_fdw to do that?

推荐答案

您是否尝试过将本地数据部署到外部服务器上的临时表中,然后将其联接到外部表中?不确定您的流程,或者这是否对您有效。

Have you tried deploying the local data into a temp table on the foreign server then joining it into the foreign table? Not sure of your process or if this would be efficient for you or not.

这篇关于postgres_fdw:可以将数据推送到外部服务器进行联接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆