X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EDBBD9FA326 for ; Tue, 23 May 2006 22:37:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 71878-10 for ; Tue, 23 May 2006 22:37:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.204]) by postgresql.org (Postfix) with ESMTP id 84F589F9D99 for ; Tue, 23 May 2006 22:37:21 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id h29so864909wxd for ; Tue, 23 May 2006 18:37:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:x-virus-scanned; b=FzO3M/hdscEhLccs4BAL19agn2SdrujE0l3NyMSWCLkz2DhQfCBfms7kV9RCMgoN5KKkZvog8oiXBp6wcB25eYxneZ249lLMZglqdncTxGH1M+bZo5oNBJkos9I3tWnB8b7O1DAC4ItBr19CmkKMY0xs6XQGXrKXqzBr9UW5FEQ= Received: by 10.70.89.5 with SMTP id m5mr7067425wxb; Tue, 23 May 2006 18:37:17 -0700 (PDT) Received: from strongwill.g2ctech ( [201.22.53.94]) by mx.gmail.com with ESMTP id h38sm858458wxd.2006.05.23.18.37.11; Tue, 23 May 2006 18:37:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by strongwill.g2ctech (Postfix) with ESMTP id 04873429E0; Tue, 23 May 2006 23:36:21 -0300 (BRT) Received: from strongwill.g2ctech ([127.0.0.1]) by localhost (strongwill [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25871-04; Tue, 23 May 2006 23:36:20 -0300 (BRT) Received: from jupiter.g2ctech (unknown [10.0.0.240]) by strongwill.g2ctech (Postfix) with ESMTP id D0FCC9788; Tue, 23 May 2006 23:36:20 -0300 (BRT) Received: from localhost (localhost [IPv6:::1]) by jupiter.g2ctech (Postfix) with ESMTP id 8C3B8106F2D; Tue, 23 May 2006 22:37:06 -0300 (BRT) From: Jorge Godoy To: "Jim C. Nasby" Subject: Re: [SQL] (Ab)Using schemas and inheritance Date: Tue, 23 May 2006 22:37:03 -0300 User-Agent: KMail/1.9.1 Cc: pgsql-general@postgresql.org References: <200605231716.58784.jgodoy@gmail.com> <20060523232609.GP64371@pervasive.com> In-Reply-To: <20060523232609.GP64371@pervasive.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200605232237.04670.jgodoy@gmail.com> X-Virus-Scanned: amavisd-new at g2ctech.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1126 X-Sequence-Number: 95918 Em Ter=E7a 23 Maio 2006 20:26, Jim C. Nasby escreveu: > Moving to -general, where it's more likely that others will have input. Thanks Jim. This wasn't clear to me when I subscribed to the other mailing= =20 list.=20 > One issue is that you'll probably be breaking new ground here a bit; I > suspect there's very few people that are using more than a handful of > schemas. Shouldn't pose any issues, but you never know; although any > issues you do run into should only be performance problems. If these come when I have, e.g., the 8k schemas Tony mentioned, then I coul= d,=20 definitely, partition my database or use some other technic to divide the=20 amount of schemas I have on each server. (I hope we have that kind of=20 problem because it will mean a very successful application :-)) > Another consideration is that the free space map doesn't care too much > for tracking space info on tons of small tables. Hmmmm... > Perhaps the biggest issue is: what happens when you need to do DDL? If > you have 1000 schemas that should be identical, you'll need to perform > any DDL 1000 times. Not really. As I said, I'm planning on using inheritance also. We have=20 tested that modifications to the parent table reflects on child tables that= =20 inherited from it. So, if I add some new column then I'll have it added to= =20 all 1k schemas. Anyway, if we have to make some change that isn't inherited by child tables= we=20 can write some script or function to help looping through all tables and=20 schemas. =20 > But as you point out, there's some interesting advantages to using > schemas like this. I see it as a very interesting possibility, specially when combined with=20 inheritance. =2D-=20 Jorge Godoy