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

Поиск
Список
Период
Сортировка
От Jinhua Luo
Тема Is it possible for postgres_fdw to push down queries on co-located tables?
Дата
Msg-id CAAc9rOyxdoo1GBpZA4LMvr2pq4T8kcC=6-OnHaaURZyQ4UUAag@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is it possible for postgres_fdw to push down queries on co-located tables?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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 select * from foreign_test2, foreign_test where m = id;
                                     QUERY PLAN
-------------------------------------------------------------------------------------
 Merge Join  (cost=444.06..590.63 rows=9316 width=72)
   Merge Cond: (foreign_test2.m = foreign_test.id)
   ->  Sort  (cost=222.03..225.44 rows=1365 width=36)
         Sort Key: foreign_test2.m
         ->  Foreign Scan on foreign_test2  (cost=100.00..150.95
rows=1365 width=36)
   ->  Sort  (cost=222.03..225.44 rows=1365 width=36)
         Sort Key: foreign_test.id
         ->  Foreign Scan on foreign_test  (cost=100.00..150.95
rows=1365 width=36)
```

If the planning involving remote tables, could the planner push down
the queries once to gain the best efficiency?


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Banck
Дата:
Сообщение: Re: Online verification of checksums
Следующее
От: Jinhua Luo
Дата:
Сообщение: What is OLD in INSTEAD OF trigger?