Re: [ADMIN] Databases Vs. Schemas - Mailing list pgsql-performance

From Tom Lane
Subject Re: [ADMIN] Databases Vs. Schemas
Date
Msg-id 8796.1079993090@sss.pgh.pa.us
Whole thread Raw
In response to Databases Vs. Schemas  ("Subbiah, Stalin" <SSubbiah@netopia.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: "Subbiah, Stalin"
Date:
Subject: Databases Vs. Schemas
Next
From: "Subbiah, Stalin"
Date:
Subject: Benchmarking postgres on Solaris/Linux