Re: [GENERAL] How to access a second database

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [GENERAL] How to access a second database
Дата
Msg-id fea778e4-b218-6dda-a0c4-dae3f55266c1@hogranch.com
обсуждение исходный текст
Ответ на Re: [GENERAL] How to access a second database  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 10/31/2017 12:41 AM, John R Pierce wrote:
> if you're doing a lot of this, why not use two schema in the same 
> database?      then its just ...schema.table...
>
> otherwise, you need to use FDW and foreign tables.
>
> see....
> https://www.postgresql.org/docs/current/static/postgres-fdw.html


oh, I should add... the advantage of using FDW is the other database can 
be on another server.   the disadvantage is, the remote data has to be 
queried and merged with the local query, the optimizer may not be able 
to do as good a job as it might with tables in different schema of the 
same database (which are treated exactly the same as tables in the same 
schema, other than naming).


-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] How to access a second database
Следующее
От: Rhhh Lin
Дата:
Сообщение: Re: [GENERAL] Backup strategy using 'wal_keep_segments'