Re: Is it possible for postgres_fdw to push down queries on co-located tables?

2018-09-20 Thread Etsuro Fujita
(2018/09/18 23:20), Jinhua Luo wrote: Sorry, the example is not so proper. I just think even if it's a simple example, e.g. join two co-located tables, the planner should work out to push down it. Can you confirm the postgresql could detect co-located tables on the same foreign server and push do

Re: Is it possible for postgres_fdw to push down queries on co-located tables?

2018-09-18 Thread Dilip Kumar
On Tue, Sep 18, 2018 at 7:50 PM, Jinhua Luo wrote: > I was testing PG10. > > Sorry, the example is not so proper. I just think even if it's a > simple example, e.g. join two co-located tables, the planner should > work out to push down it. Can you confirm the postgresql could detect > co-located t

Re: Is it possible for postgres_fdw to push down queries on co-located tables?

2018-09-18 Thread Jinhua Luo
I was testing PG10. Sorry, the example is not so proper. I just think even if it's a simple example, e.g. join two co-located tables, the planner should work out to push down it. Can you confirm the postgresql could detect co-located tables on the same foreign server and push down queries on them?

Re: Is it possible for postgres_fdw to push down queries on co-located tables?

2018-09-18 Thread Tom Lane
Jinhua Luo writes: > That is, if table `foo` and table `bar` are both tables on the same > remote server, then when I do `select * from foo, bar`, can it > delegate the whole query on the remote side, rather than fetching rows > from both servers one by one and do merging on the local side? Reaso

Is it possible for postgres_fdw to push down queries on co-located tables?

2018-09-18 Thread Jinhua Luo
That is, if table `foo` and table `bar` are both tables on the same remote server, then when I do `select * from foo, bar`, can it delegate the whole query on the remote side, rather than fetching rows from both servers one by one and do merging on the local side? For example: ``` foo=> explain s