Re: One Large Table or Multiple DBs?

From: Robert Treat <robert(at)omniti(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Mike <akiany(at)gmail(dot)com>
Subject: Re: One Large Table or Multiple DBs?
Date: 2007-07-13 03:37:26
Message-ID: 200707122337.26729.robert@omniti.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-07-13 03:54:08 Re: returns setof rec... simple exampe doesn't work
Previous Message Gauthier, Dave 2007-07-13 03:36:28 Re: returns setof rec... simple exampe doesn't work