"Kohler Manuel (ID SIS)" <manuel.kohler@id.ethz.ch> writes:
> here are the Query plans. The first plan is on the source database directly. So no fdw involved:
Do you have use_remote_estimate enabled? The rowcount estimates for the
foreign tables seem pretty far from reality; use_remote_estimates should
help.
regards, tom lane