Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 571B76503BA for ; Wed, 26 Nov 2008 20:48:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06247-10 for ; Wed, 26 Nov 2008 20:48:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mail.postgresql.org (Postfix) with ESMTP id 7C71D65014C for ; Wed, 26 Nov 2008 20:48:19 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k40so1574179ugc.7 for ; Wed, 26 Nov 2008 16:48:17 -0800 (PST) Received: by 10.67.97.3 with SMTP id z3mr68288ugl.37.1227746897441; Wed, 26 Nov 2008 16:48:17 -0800 (PST) Received: from oxford.xeocode.com.enterprisedb.com ([87.127.95.198]) by mx.google.com with ESMTPS id 34sm784478ugh.10.2008.11.26.16.48.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 26 Nov 2008 16:48:16 -0800 (PST) To: "Greg Jaman" Cc: pgsql-performance@postgresql.org Subject: Re: Partition table query performance In-Reply-To: (Greg Jaman's message of "Tue\, 25 Nov 2008 20\:07\:46 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+imap.gmail.com:PG" 98021) References: From: Gregory Stark Organization: EnterpriseDB Date: Thu, 27 Nov 2008 00:48:14 +0000 Message-ID: <8763maouy9.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.41 tagged_above=0 required=5 tests=SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200811/279 X-Sequence-Number: 32010 "Greg Jaman" writes: > I have a problem with partitioning and I'm wondering if anyone can provide > some insight. I'm trying to find the max value of a column across multiple > partitions. The query against the partition set is quite slow while queries > against child partitions is very fast! I'm afraid this is a known problematic use case of Postgres's current partitioning support. Postgres is not capable of finding the plan which you're undoubtedly looking for where it uses the same plan as your child table query iterating over the partitions. There are several groups working to improve this in different ways but none of them appear to be on track to be in 8.4 so it will be 8.5 or later before they appear. Sorry. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!