Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvy2m-0000wc-Sz for pgsql-performance@arkaria.postgresql.org; Sat, 23 May 2015 01:16:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yvy2m-0002j1-AZ for pgsql-performance@arkaria.postgresql.org; Sat, 23 May 2015 01:16:04 +0000 Received: from makus.postgresql.org ([174.143.35.229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yvy2l-0002ir-Fi for pgsql-performance@postgresql.org; Sat, 23 May 2015 01:16:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Yvy0e-0005gj-Rg for pgsql-performance@postgresql.org; Sat, 23 May 2015 01:13:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t4N1DorF021055; Fri, 22 May 2015 21:13:50 -0400 From: Tom Lane To: Dave Johansen cc: pgsql-performance Subject: Re: MAX() and multi-column index on a partitioned table? In-reply-to: References: <17857.1432334536@sss.pgh.pa.us> Comments: In-reply-to Dave Johansen message dated "Fri, 22 May 2015 16:53:19 -0700" Date: Fri, 22 May 2015 21:13:50 -0400 Message-ID: <21054.1432343630@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Dave Johansen writes: > On Fri, May 22, 2015 at 3:42 PM, Tom Lane wrote: >> What PG version are you using? 9.1 or newer should know how to do this >> with a merge append of several indexscans. > Sorry, I should have mentioned that in the original email. I'm using 8.4.20 > on RHEL 6. From your reply, it sounds like this is the expected behavior > for 8.4 and 9.0. Is that the case? Yeah, pre-9.1 is not very bright about that. You could factor the query manually, perhaps, though it's surely a pain in the neck. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance