X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8F0DED1B579 for ; Wed, 21 Apr 2004 17:28:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 24870-02 for ; Wed, 21 Apr 2004 17:28:13 -0300 (ADT) Received: from hotmail.com (bay2-f143.bay2.hotmail.com [65.54.247.143]) by svr1.postgresql.org (Postfix) with ESMTP id 5CC3AD1B482 for ; Wed, 21 Apr 2004 17:28:10 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 21 Apr 2004 13:28:11 -0700 Received: from 208.186.54.187 by by2fd.bay2.hotmail.msn.com with HTTP; Wed, 21 Apr 2004 20:28:11 GMT X-Originating-IP: [208.186.54.187] X-Originating-Email: [missive@hotmail.com] X-Sender: missive@hotmail.com From: "Lee Harr" To: pgsql-general@postgresql.org Subject: Re: Ordering YYYY MM DD in reverse chrono order Date: Wed, 21 Apr 2004 20:28:11 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 21 Apr 2004 20:28:11.0731 (UTC) FILETIME=[2A7E0A30:01C427DF] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200404/775 X-Sequence-Number: 60017 > >ORDER BY >date_part('year', uu.add_date), date_part('month', uu.add_date), >date_part('day', uu.add_date) DESC; > How about just ORDER BY uu.add_date DESC ? It would be cheaper without all of those date_part calls, and should order in the same way. _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail