X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B265CDB7FA for ; Sat, 19 Nov 2005 10:28:04 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30456-06 for ; Sat, 19 Nov 2005 14:28:07 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id A329FDBC11 for ; Sat, 19 Nov 2005 10:28:01 -0400 (AST) Received: (qmail 23980 invoked by uid 500); 19 Nov 2005 14:31:20 -0000 Date: Sat, 19 Nov 2005 08:31:20 -0600 From: Bruno Wolff III To: Jeremy Palmer Cc: pgsql-sql@postgresql.org, 'Michael Glaesemann' Subject: Re: DISTINCT ON Message-ID: <20051119143120.GA22669@wolff.to> Mail-Followup-To: Bruno Wolff III , Jeremy Palmer , pgsql-sql@postgresql.org, 'Michael Glaesemann' References: <20051119040630.FEYC1416.mta4-rme.xtra.co.nz@creeping> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051119040630.FEYC1416.mta4-rme.xtra.co.nz@creeping> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/159 X-Sequence-Number: 23410 On Sat, Nov 19, 2005 at 17:06:27 +1300, Jeremy Palmer wrote: > > Interesting enough, on my server the "distinct on" clause that I originally > ran takes 10% of execution time that the query you provided does. If DISTINCT ON wasn't useful, I doubt it would have been added.