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 7D8949FA278 for ; Wed, 24 May 2006 14:57:05 -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 11055-10 for ; Wed, 24 May 2006 14:56:59 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.192]) by postgresql.org (Postfix) with ESMTP id 39C6A9F9398 for ; Wed, 24 May 2006 14:56:58 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id h28so835150wxd for ; Wed, 24 May 2006 10:56:58 -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=E82Q2y911N+bRwPFDtfWROpiMUMw+KotnxvCfeNu+TK/lqsTt2TxV9Rjt68H9e6kg7brnriorInrzTFcO61wirj6jUhNNzj3AgljKTR7L8x+B5pXGWdgZHFB8nTVOUARIRAdmM5BFOfcW1DvwsM7w8rdJAmO9tRw6YezfWy9eb0= Received: by 10.70.126.6 with SMTP id y6mr8031086wxc; Wed, 24 May 2006 10:56:57 -0700 (PDT) Received: from strongwill.g2ctech ( [201.22.53.94]) by mx.gmail.com with ESMTP id h11sm7368405wxd.2006.05.24.10.56.54; Wed, 24 May 2006 10:56:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by strongwill.g2ctech (Postfix) with ESMTP id B2514B0D23; Wed, 24 May 2006 15:56:01 -0300 (BRT) Received: from strongwill.g2ctech ([127.0.0.1]) by localhost (strongwill [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08302-01-2; Wed, 24 May 2006 15:56:01 -0300 (BRT) Received: from jupiter.g2ctech (unknown [10.0.0.240]) by strongwill.g2ctech (Postfix) with ESMTP id 908945B462; Wed, 24 May 2006 15:56:01 -0300 (BRT) Received: from localhost (localhost [IPv6:::1]) by jupiter.g2ctech (Postfix) with ESMTP id 0F3089F414; Wed, 24 May 2006 14:56:47 -0300 (BRT) From: Jorge Godoy To: Richard Broersma Jr Subject: Re: [SQL] (Ab)Using schemas and inheritance Date: Wed, 24 May 2006 14:56:43 -0300 User-Agent: KMail/1.9.1 Cc: Alban Hertroys , "Jim C. Nasby" , pgsql-general@postgresql.org References: <20060524174855.47650.qmail@web31807.mail.mud.yahoo.com> In-Reply-To: <20060524174855.47650.qmail@web31807.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605241456.45645.jgodoy@gmail.com> X-Virus-Scanned: amavisd-new at g2ctech.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1185 X-Sequence-Number: 95977 Em Quarta 24 Maio 2006 14:48, Richard Broersma Jr escreveu: > > From what I've read I am not sure that an Index created on the base/parent > table will help when preforming select queries on data across all of the > children. If I interpret the "Caveats" correctly I would assume that the > index will only apply to data that is inserted directly into the > base/parent table. It won't. What I was saying is that I don't need an index just for this reason because data partitioning would be intrinsic to the inheritance solution. I was thinking as described in http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html (please, see 5.9.2, specially). With his solution I'd need an index to have this partitioning implemented and I'd suffer without it. With inheritance I just need this index if I'm actually operating with dates, not to just retrieve the right data for a given year (whatever that means ;-)). > From the Manual: > > 5.8.1. Caveats > > ... > > A serious limitation of the inheritance feature is that indexes (including > unique constraints) and foreign key constraints only apply to single > tables, not to their inheritance children. This is true on both the > referencing and referenced sides of a foreign key constraint. This is why, in one of the messages, I've said that I'd have to create indices for children tables. But hey, it is nice that you're also helping us here :-) Thanks! :-) -- Jorge Godoy