pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tv@fuzzy.cz
To: Divakar Singh <dpsmails@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Which gives good performance? separate database vs separate schema
Date: Thu, 25 Nov 2010 13:02:08 +0100
Message-ID: <d0ba0839bcf4b41b456ec741f705e9bb.squirrel@sq.gransy.com> (raw)
In-Reply-To: <991565.83793.qm@web65414.mail.ac4.yahoo.com>
References: <991565.83793.qm@web65414.mail.ac4.yahoo.com>

Hello,

> Now, should I put these tables in 1 Database's different schemas or in
> separate
> databases itself for good performance?
> I am using libpq for connection.
>
> Pictorial Representation:
>
> Process1 -> DB1.schema1.table1
>
> Process2 -> DB1.schema2.table1
>
>   Vs.
>
> Process1 -> DB1.default.table1
>
> Process2 -> DB2.default.table1
>
> Which one is better?

Well, that depends on what you mean by "database." In many other products
each database is completely separate (with it's own cache, processes etc).
In PostgreSQL, there's a cluster of databases, and all of them share the
same cache (shared buffers) etc.

I don't think you'll get performance improvement from running two
PostgreSQL clusters (one for DB1, one for DB2). And when running two
databases within the same cluster, there's no measurable performance
difference AFAIK.

So the two options are exactly the same.

Tomas




view thread (9+ messages)  latest in thread

Message-ID: <d0ba0839bcf4b41b456ec741f705e9bb.squirrel@sq.gransy.com>
Permalink:  ../d0ba0839bcf4b41b456ec741f705e9bb.squirrel@sq.gransy.com/
Also on:    postgresql.org/message-id/d0ba0839bcf4b41b456ec741f705e9bb.squirrel@sq.gransy.com

 · 

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: tv@fuzzy.cz, dpsmails@yahoo.com
  Subject: Re: Which gives good performance? separate database vs separate schema
  In-Reply-To: <d0ba0839bcf4b41b456ec741f705e9bb.squirrel@sq.gransy.com>

* 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