Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 914B59FB2E9 for ; Fri, 25 May 2007 15:34:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 13056-01-2 for ; Fri, 25 May 2007 15:34:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id AB8EE9FB4C2 for ; Fri, 25 May 2007 15:34:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4PIYOPX020204; Fri, 25 May 2007 14:34:24 -0400 (EDT) To: arnaulist@andromeiberica.com cc: PostgreSQL Performance Subject: Re: How PostgreSQL handles multiple DDBB instances? In-reply-to: <465727E8.8090806@andromeiberica.com> References: <4656A3BE.1070409@andromeiberica.com> <8684.1180103080@sss.pgh.pa.us> <465719D5.9040107@andromeiberica.com> <19775.1180116288@sss.pgh.pa.us> <465727E8.8090806@andromeiberica.com> Comments: In-reply-to Arnau message dated "Fri, 25 May 2007 20:16:08 +0200" Date: Fri, 25 May 2007 14:34:24 -0400 Message-ID: <20203.1180118064@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/533 X-Sequence-Number: 24923 Arnau writes: > The point I'm worried is performance. Do you think the performance > would be better executing exactly the same queries only adding an extra > column to all the tables e.g. customer_id, than open a connection to the > only one customers DB and execute the query there? [ shrug... ] That's going to depend on enough factors that I don't think anyone could give you a generic answer. You'd have to test it for yourself under your own application conditions. However: doing it that way seems to me to create severe risks that the customers might be able to look at each others' data. You probably want to go with separate databases just as a security matter. regards, tom lane