Can anyone suggest me what are the pros & cons of using dblink in Postgres?
I use dblink to connect to multiple database in my function in Postgres.
dblink
is a great tool and it works very well.
The main cons are:
dblink
in a JOIN
, in order to process this JOIN
a lot of rows will have to be transferred from the remote server which will use bandwidth and degrade performanceIf you have the possibility to use a single database for each query and not use multiple databases with dblink
it will always be a better option.
Read also this interesting thread: http://www.postgresql-archive.org/dblink-performance-td5056145.html