Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 48C646326EF for ; Sun, 28 Feb 2010 18:47:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 18832-06 for ; Sun, 28 Feb 2010 22:46:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id A5329632178 for ; Sun, 28 Feb 2010 18:47:04 -0400 (AST) Received: from adsl-63-195-55-98.dsl.snfc21.pacbell.net ([63.195.55.98] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1Nlrub-0004S6-VP; Sun, 28 Feb 2010 14:46:59 -0800 Message-ID: <4B8AF25C.3030209@agliodbs.com> Date: Sun, 28 Feb 2010 14:46:52 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Kenneth Marshall CC: Kevin Kempter , pgsql-performance@postgresql.org Subject: Re: partitioned tables query not using indexes References: <201002240736.36341.kevink@consistentstate.com> <4B8AD21A.2020904@agliodbs.com> <20100228215157.GA14613@it.is.rice.edu> In-Reply-To: <20100228215157.GA14613@it.is.rice.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.105 tagged_above=-10 required=5 tests=AWL=0.338, BAYES_00=-2.599, SUBJECT_FUZZY_TION=0.156 X-Spam-Level: X-Archive-Number: 201002/403 X-Sequence-Number: 37824 On 2/28/10 1:51 PM, Kenneth Marshall wrote: > On Sun, Feb 28, 2010 at 12:29:14PM -0800, Josh Berkus wrote: >>> However the same query against the base table when specifying the check >>> constraint key in the where clause produces sequential scans: >> Does the "master" table have the same indexes as the slave partitions? >> >> --Josh Berkus >> > Does this help? I have an empty base table without indexes and partitions > underneath that do have the index. I did not think that an index on the > parent table did anything. I'm not sure that it does, but "try it and see" is easier than reading the planner code. --Josh Berkus