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

From Robert Treat
Subject Re: One Large Table or Multiple DBs?
Date
Msg-id 200707122337.26729.robert@omniti.com
Whole thread Raw
In response to One Large Table or Multiple DBs?  (Mike <akiany@gmail.com>)
List pgsql-general
On Monday 09 July 2007 17: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.
>

Well, generally I'd say you want to try and scale vertically as far as you
can, because database (especially postgresql) scale vertically fairly well,
and trying to spread a database across multiple servers introduces several
different kins of complexity and other issues.  Thats said, most "as a
service" solutions try to segment thier database in a way that gives
individual customers or groups of customers onto thier own databases/servers,
often with the result of shooting themselves in the foot when they realize
that the obvious segmenting key doesn't lead to balanced loads (ie. if you
have two boxes, and you segment your largest customer to thier own box, but
they are 75% of your buisness, your solution doesn't scale well).

--
Robert Treat
Database Architect
http://www.omniti.com/

pgsql-general by date:

Previous
From: Madison Kelly
Date:
Subject: Re: PostgreSQL equivelant of this MySQL query
Next
From: paddy carroll
Date:
Subject: Re: PostgreSQL equivelant of this MySQL query