Given this query:
select *
from fdw_schema.customer c
where exists
( select *
from fdw_schema.purchase p
where c.id = p.customer_id
and p.purchase_date > now() - interval '30 days');
Will the full query get pushed down by postgres_fdw to the remote server?
My alternative would be:
select distinct c.*
from fdw_schema.customer c
join fdw_schema.purchase p on c.id = p.customer_id
where p.purchase_date > now() - interval '30 days';
I'm looking at pg_stat_activity
on the foreign server, but all I can see is
FETCH 100 FROM c2