Search code examples
postgresqldblinkpostgres-fdw

DBLINK vs Postgres_FDW, which one may provide better performance?


I have a use case to distribute data across many databases on many servers, all in postgres tables. From any given server/db, I may need to query another server/db. The queries are quite basic, standard selects with where clauses on standard fields.

I have currently implemented postgres_FDW, (I'm, using postgres 9.5), but I think the queries are not using indexes on the remote db. For this use case (a random node may query N other nodes), which is likely my best performance choice based on how each underlying engine actually executes?


Solution

  • My solution was simple: I upgraded to Postgres 10, and it appears to push where clauses down to the remote server.