Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D0A68634CCA for ; Mon, 28 Jun 2010 05:01:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 61991-02 for ; Mon, 28 Jun 2010 08:01:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1.hi-media-techno.com (smtp1.hi-media-techno.com [195.158.241.85]) by mail.postgresql.org (Postfix) with ESMTP id 86CBD6323BC for ; Mon, 28 Jun 2010 05:01:22 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 49CBD93B87; Mon, 28 Jun 2010 10:01:20 +0200 (CEST) Received: from smtp1.hi-media-techno.com ([127.0.0.1]) by localhost (smtp1.backbone.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XRmx3PIh-CkZ; Mon, 28 Jun 2010 10:01:20 +0200 (CEST) Received: from mail1.hi-media-techno.com (unknown [192.168.27.17]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 09CA193B75; Mon, 28 Jun 2010 10:01:20 +0200 (CEST) Received: from dim (unknown [83.167.62.196]) by mail1.hi-media-techno.com (Postfix) with ESMTPSA id B24ED4C330; Mon, 28 Jun 2010 10:01:19 +0200 (CEST) Received: by dim (Postfix, from userid 1000) id BF76F5985D; Mon, 28 Jun 2010 10:01:19 +0200 (CEST) From: Dimitri Fontaine To: tony@exquisiteimages.com Cc: pgsql-performance@postgresql.org Subject: Re: Architecting a database Organization: Hi-Media References: <4f262829ce5efd2bc0296ef8a081cc41.squirrel@www.exquisiteimages.com> User-Mail-Address: dfontaine@hi-media.com Date: Mon, 28 Jun 2010 10:01:19 +0200 In-Reply-To: <4f262829ce5efd2bc0296ef8a081cc41.squirrel@www.exquisiteimages.com> (tony@exquisiteimages.com's message of "Fri, 25 Jun 2010 15:36:07 -0400") Message-ID: <87tyonsi0g.fsf@hi-media-techno.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/495 X-Sequence-Number: 39351 tony@exquisiteimages.com writes: > I am wondering how I should architect this in PostgreSQL. Should I follow > a similar strategy and have a separate database for each client and one > database that contains the global data? As others said already, there's more problems to foresee doing so that there are advantages. If you must separate data for security concerns, your situation would be much more comfortable using schema. If it's all about performances, see about partitioning the data, and maybe not even on the client id but monthly, e.g., depending on the queries you run in your application. Regards, -- dim