Skip site navigation (1) Skip section navigation (2)

Re: Databases Vs. Schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Subbiah, Stalin" <SSubbiah(at)netopia(dot)com>
Cc: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>,"'pgsql-performance(at)postgresql(dot)org'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Databases Vs. Schemas
Date: 2004-03-22 22:04:50
Message-ID: 8796.1079993090@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-performance
"Subbiah, Stalin" <SSubbiah(at)netopia(dot)com> writes:
> Is it better to have 1000 databases vs 1000 schemas in a
> database cluster.

You almost certainly want to go for schemas, at least from a performance
point of view.  The overhead of a schema is small (basically one more
row in pg_namespace) whereas the overhead of a database is not trivial.

The main reason you might not want to use schemas is if you want fairly
airtight separation between different services.  Separate databases
would prevent services from looking at each others' catalog entries.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Subbiah, StalinDate: 2004-03-23 00:05:45
Subject: Benchmarking postgres on Solaris/Linux
Previous:From: Subbiah, StalinDate: 2004-03-22 21:30:24
Subject: Databases Vs. Schemas

pgsql-admin by date

Next:From: Subbiah, StalinDate: 2004-03-23 00:05:45
Subject: Benchmarking postgres on Solaris/Linux
Previous:From: Sam Barnett-CormackDate: 2004-03-22 21:34:46
Subject: Re: Slow Foreign Key

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group