Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3D0C914518E8 for ; Thu, 8 Dec 2011 21:13:33 -0400 (AST) Received: from mail-yx0-f174.google.com ([209.85.213.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RYp1m-0007r2-EU for pgsql-sql@postgresql.org; Fri, 09 Dec 2011 01:13:33 +0000 Received: by yenm11 with SMTP id m11so1645204yen.19 for ; Thu, 08 Dec 2011 17:13:17 -0800 (PST) Received: by 10.236.181.225 with SMTP id l61mr8363248yhm.131.1323393196964; Thu, 08 Dec 2011 17:13:16 -0800 (PST) Received: from ayaki.localdomain (124-169-254-28.dyn.iinet.net.au. [124.169.254.28]) by mx.google.com with ESMTPS id d11sm14090577anc.4.2011.12.08.17.13.14 (version=SSLv3 cipher=OTHER); Thu, 08 Dec 2011 17:13:16 -0800 (PST) Message-ID: <4EE160A7.3070106@ringerc.id.au> Date: Fri, 09 Dec 2011 09:13:11 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: chester c young CC: pgsql-sql@postgresql.org Subject: Re: partitions versus databases References: <1323354369.98656.YahooMailClassic@web161406.mail.bf1.yahoo.com> In-Reply-To: <1323354369.98656.YahooMailClassic@web161406.mail.bf1.yahoo.com> Content-Type: multipart/alternative; boundary="------------050105040204090004090208" X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/31 X-Sequence-Number: 36092 This is a multi-part message in MIME format. --------------050105040204090004090208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 12/08/2011 10:26 PM, chester c young 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 post a question on Stack Overflow and on the mailing list, please link to your stack overflow question from your mailing list post! http://stackoverflow.com/questions/8432636/in-postgresql-are-partitions-or-multiple-databases-more-efficient/ That'll help avoid duplication of effort, and make it easier for people searching for similar topics later to find out more. -- Craig Ringer --------------050105040204090004090208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 12/08/2011 10:26 PM, chester c young 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 post a question on Stack Overflow and on the mailing list, please link to your stack overflow question from your mailing list post!

  http://stackoverflow.com/questions/8432636/in-postgresql-are-partitions-or-multiple-databases-more-efficient/

That'll help avoid duplication of effort, and make it easier for people searching for similar topics later to find out more.

--
Craig Ringer
--------------050105040204090004090208--