Обсуждение: Many databases ou many schemas

Поиск
Список
Период
Сортировка

Many databases ou many schemas

От
Daniel Bergmann
Дата:
Folks ! who can help, I'm migrating a sql server system that contains many databases and that the queries in these make join between the databases, going to postgres I create a database with only several schemas? or several databases using dblink to do the joins? in case of a single database how can I manage the tablespaces? per schema (1 schema in 1 tablespace) ?

Thanks,
Daniel

Re: Many databases ou many schemas

От
Laurenz Albe
Дата:
On Fri, 2022-05-20 at 11:03 -0300, Daniel Bergmann wrote:
> Folks ! who can help, I'm migrating a sql server system that contains many databases
> and that the queries in these make join between the databases, going to postgres I
> create a database with only several schemas? or several databases using dblink to
> do the joins? in case of a single database how can I manage the tablespaces?
> per schema (1 schema in 1 tablespace) ?

If you want to join the tables, use different schemas in a single database.
dblink or foreign data wrappers would just add additional complexity and
slow down operation.

Don't create any tablespaces, keep everything in the default tablespace.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



Re: Many databases ou many schemas

От
Ron
Дата:
On 5/20/22 09:15, MichaelDBA Vitale wrote:
> In PG, tablespaces only have importance when mapping them to different 
> mount points that might have different IO response times. 

Or if for some reason "you" don't want to use lvm.

Likewise, auditors or upper management might say that each "database" must 
be in a separate folder.

-- 
Angular momentum makes the world go 'round.