Re: [GENERAL] Joins between foreign tables

2015-06-08 Thread Jason Dusek
Hi Geoff, Thanks for your swift reply. Breaking the query up like this would seem to address the problem: CREATE UNLOGGED TABLE tmp ASSELECT * FROM table_on_server2 WHERE created_at >= date_trunc('day', now()); SELECT email FROM table_on_server1 WHERE id IN (SELECT user_id FROM tmp); It would s

Re: [GENERAL] Joins between foreign tables

2015-06-08 Thread Geoff Montee
On Mon, Jun 8, 2015 at 10:29 AM, Jason Dusek wrote: > The databases involved are all Postgres 9.4 or 9.3. The FDW is the Postgres > FDW. > > The join node (the one from which queries are issued) is Postgres 9.4 > installed yesterday from the Postgres Apt repository. It's using the version > of the

[GENERAL] Joins between foreign tables

2015-06-08 Thread Jason Dusek
Dear Postgres, Consider a query like: SELECT table_on_server1.email FROM table_on_server1 JOIN table_on_server2 ON (table_on_server1.id = table_on_server2.user_id) WHERE table_on_server2.created_at >= date_trunc('day', now()) One could imagine the plan being something like: 1. Fin