Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 37DB69FC7E1 for ; Wed, 31 Oct 2007 11:30:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 72235-07-4 for ; Wed, 31 Oct 2007 11:30:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from chip2og50.obsmtp.com (chip2og50.obsmtp.com [64.18.13.37]) by postgresql.org (Postfix) with SMTP id 46E069FC4DC for ; Wed, 31 Oct 2007 11:17:14 -0300 (ADT) Received: from source ([63.240.6.47]) (using TLSv1) by chip2ob50.postini.com ([64.18.5.12]) with SMTP; Wed, 31 Oct 2007 07:17:07 PDT Received: from 172.16.1.24 by mail.Mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D1)); Wed, 31 Oct 2007 10:18:05 -0400 X-Server-Uuid: 0764DD54-627B-4C45-B37D-789FBDEDA467 Received: from MI8NYCMAIL08.Mi8.com ([172.16.1.165]) by d01smtp03.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 31 Oct 2007 10:18:01 -0400 Received: from 69.181.101.67 ([69.181.101.67]) by MI8NYCMAIL08.Mi8.com ( [172.16.1.190]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.106]) with Microsoft Exchange Server HTTP-DAV ; Wed, 31 Oct 2007 14:17:25 +0000 User-Agent: Microsoft-Entourage/11.3.6.070618 Date: Wed, 31 Oct 2007 07:16:13 -0700 Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1 From: "Luke Lonergan" To: "Mark Kirkwood" cc: "Gregory Stark" , "Heikki Linnakangas" , "Anton" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] partitioned table and ORDER BY indexed_field DESC LIMIT 1 Thread-Index: AcgbyJeL1kizrIe7EdyOQgAbY6InMA== In-Reply-To: <4726C52E.5020909@paradise.net.nz> MIME-Version: 1.0 X-OriginalArrivalTime: 31 Oct 2007 14:18:01.0668 (UTC) FILETIME=[D8516040:01C81BC8] X-WSS-ID: 6B36511C21G7197437-26-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/374 X-Sequence-Number: 27396 BTW - Mark has volunteered to work a Postgres patch together. Thanks Mark! - Luke On 10/29/07 10:46 PM, "Mark Kirkwood" wrote: > Luke Lonergan wrote: >> Sure - it's here: >> http://momjian.us/mhonarc/patches_hold/msg00381.html >> >> > > To clarify - we've fixed this in Greenplum db - the patch as submitted > is (hopefully) a hint about how to fix it in Postgres, rather than a > working patch... as its full of non-postgres functions and macros: > > CdbPathLocus_MakeHashed > cdbpathlocus_pull_above_projection > cdbpullup_findPathKeyItemInTargetList > cdbpullup_makeVar > cdbpullup_expr > > Cheers > > Mark