pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Subbiah, Stalin <SSubbiah@netopia.com>
Cc: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Cc: 'pgsql-performance@postgresql.org' <pgsql-performance@postgresql.org>
Subject: Re: Databases Vs. Schemas
Date: Mon, 22 Mar 2004 17:04:50 -0500
Message-ID: <8796.1079993090@sss.pgh.pa.us> (raw)
In-Reply-To: <F1F84A2E5F9EBD46A9BDB905EB5B103937B8@mxca1.netopia.com>
References: <F1F84A2E5F9EBD46A9BDB905EB5B103937B8@mxca1.netopia.com>

"Subbiah, Stalin" <SSubbiah@netopia.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



view thread (8+ messages)  latest in thread

Message-ID: <8796.1079993090@sss.pgh.pa.us>
Permalink:  ../8796.1079993090@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8796.1079993090@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, SSubbiah@netopia.com, pgsql-admin@postgresql.org
  Subject: Re: Databases Vs. Schemas
  In-Reply-To: <8796.1079993090@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox