Re: [GENERAL] How to access a second database - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] How to access a second database
Date
Msg-id fea778e4-b218-6dda-a0c4-dae3f55266c1@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] How to access a second database  (John R Pierce <pierce@hogranch.com>)
List 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 by date:

Previous
From: John R Pierce
Date:
Subject: Re: [GENERAL] How to access a second database
Next
From: Rhhh Lin
Date:
Subject: Re: [GENERAL] Backup strategy using 'wal_keep_segments'