X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C0AA89F9B01 for ; Thu, 25 May 2006 17:36:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 29309-06 for ; Thu, 25 May 2006 17:36:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from skynet.simkin.ca (skynet.simkin.ca [199.175.137.210]) by postgresql.org (Postfix) with ESMTP id 678AE9F94EA for ; Thu, 25 May 2006 17:36:33 -0300 (ADT) Received: from charon.medialogik.com (crecy.medialogik.com [72.51.27.2]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by skynet.simkin.ca (Postfix) with ESMTP id 428D6FAC5 for ; Thu, 25 May 2006 13:36:31 -0700 (PDT) From: Alan Hodgson Organization: Simkin Network Consulting To: pgsql-performance@postgresql.org Subject: Re: is it possible to make this faster? Date: Thu, 25 May 2006 13:36:30 -0700 User-Agent: KMail/1.8.3 References: <20060525202314.GA20747@wolff.to> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605251336.30985@hal.medialogik.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/474 X-Sequence-Number: 19261 On May 25, 2006 01:31 pm, "Merlin Moncure" wrote: > > SELECT DISTINCT ON (a, b) a, b, c FROM t ORDER BY a DESC, b DESC, c > > DESC; > > that is actually slower than group by in my case...am i missing > something? (both essentially resolved to seq_scan) Try it with an index on a,b,c. -- Alan