From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: partitions versus databases
Date: 10 Dec 2011 22:42:15 GMT
Message-ID: <jc0n87$4nb$3@reversiblemaps.ath.cx> (raw)
References: <1323354369.98656.YahooMailClassic@web161406.mail.bf1.yahoo.com>
On 2011-12-08, chester c young <chestercyoung@yahoo.com> wrote:
> have an db with about 15 tables that will handle many companies. no data overlap between companies. is it more efficient run-time to use one database and index each row by company id, and one database and partition each table by company id, or to create a database for each company?
>
> it is a web-based app using persistent connections. no copying.
>
if you know you will never want to aggregate data across several
companies. databases are cheap, portable, easily duplicated, and
self-contained, can easily be dumped, restored, and dropped
individually, go with one per company.
if there's a possibility you may want to merge two companies, or
aggregate data in some other way you want to put them all in the
same database so that sequences can be shared to ensure that ids
are unique etc... you still have the option of partitioning by
schema, table name, or just by tagging each record.
--
⚂⚃ 100% natural
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-sql@postgresql.org
Cc: jasen@xnet.co.nz
Subject: Re: partitions versus databases
In-Reply-To: <jc0n87$4nb$3@reversiblemaps.ath.cx>
* 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