Re: One Large Table or Multiple DBs? - Mailing list pgsql-general

From Ron Johnson
Subject Re: One Large Table or Multiple DBs?
Date
Msg-id 4696EAE7.306@cox.net
Whole thread Raw
In response to One Large Table or Multiple DBs?  (Mike <akiany@gmail.com>)
List pgsql-general
On 07/09/07 16:18, Mike wrote:
> Hi,
>
> What is efficient approach toward storing a web application's user
> data. How do applications such as basecamp, SalesForce or QuickBooks
> online store their data? Is it in one DB with huge tables each record
> having a user account's foreign key or do they create a separate
> database for each of their accounts? Which one is more efficient? My
> guess was in one large DB with large tables.

How big is "big"?

What is "efficient"?  Speed, management, upgrades, backups, scalability?

If each customer has 80GB of data, then separate databases are the
way to go, since it eases scalability and allows for parallel
backups.  But then upgrades must be applied to each of thousands of
databases.  If each customer has 100MB of data, then unified tables
keyed off of account number would be simpler.

In between is schema-per-account.  But upgrades are still a chore.

--
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!


pgsql-general by date:

Previous
From: Jorge Godoy
Date:
Subject: Re: Accent-insensitive search
Next
From: "Gauthier, Dave"
Date:
Subject: Re: returns setof rec... simple exampe doesn't work