Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DC4AD632EA4 for ; Tue, 13 Jul 2010 00:01:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08767-10 for ; Tue, 13 Jul 2010 03:01:14 +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 EA913632DD7 for ; Tue, 13 Jul 2010 00:01:13 -0300 (ADT) Received: from 24-196-96-98.static.mdsn.wi.charter.com ([24.196.96.98] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1OYVk5-0003Hq-UM; Mon, 12 Jul 2010 20:01:12 -0700 Message-ID: <4C3BD6F4.4070802@agliodbs.com> Date: Mon, 12 Jul 2010 22:01:08 -0500 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: Kevin Kempter CC: pgsql-performance@postgresql.org Subject: Re: partition queries hitting all partitions even though check key is specified References: <200909020852.30405.kevink@consistentstate.com> <200909020905.18688.kevink@consistentstate.com> In-Reply-To: <200909020905.18688.kevink@consistentstate.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201007/202 X-Sequence-Number: 39591 On 9/2/09 10:05 AM, Kevin Kempter wrote: > On Wednesday 02 September 2009 09:02:27 Scott Marlowe wrote: >> On Wed, Sep 2, 2009 at 8:52 AM, Kevin Kempter > wrote: >>> Hi all; >>> >>> I cant figure out why we're scanning all of our partitions. I don't think extract() is immutable, which would pretty much invalidate your check constraints as far as CE is concerned. I suggest feeding the actual numeric values to the check constraints. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com