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 AEC639FA43B for ; Thu, 25 May 2006 17:32:02 -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 29014-04 for ; Thu, 25 May 2006 17:31:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.207]) by postgresql.org (Postfix) with ESMTP id 476169FA42B for ; Thu, 25 May 2006 17:31:42 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id 18so1889663nzp for ; Thu, 25 May 2006 13:31:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eI+Vd/Sr2OiIQZSHPxXiyghNWoC52s8PVczPaLrNo1nWmv8NLKN1Nl3EtZ1aFO7ikZIt+rzx56ZC/9eWzi3hg8P11m9YUh8BS1HH01Ekhj5hjs5RAKyTMedsTp/wyeAZj8xcCh+J0H3Iw+ZUXN4IPFgDyIu8OaGWkGy6ZY8VAro= Received: by 10.65.35.5 with SMTP id n5mr1540135qbj; Thu, 25 May 2006 13:31:41 -0700 (PDT) Received: by 10.65.137.19 with HTTP; Thu, 25 May 2006 13:31:40 -0700 (PDT) Message-ID: Date: Thu, 25 May 2006 16:31:40 -0400 From: "Merlin Moncure" To: "Bruno Wolff III" , "Postgresql Performance" Subject: Re: is it possible to make this faster? In-Reply-To: <20060525202314.GA20747@wolff.to> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060525202314.GA20747@wolff.to> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/472 X-Sequence-Number: 19259 On 5/25/06, Bruno Wolff III wrote: > On Thu, May 25, 2006 at 16:07:19 -0400, > Merlin Moncure wrote: > > been doing a lot of pgsql/mysql performance testing lately, and there > > is one query that mysql does much better than pgsql...and I see it a > > lot in normal development: > > > > select a,b,max(c) from t group by a,b; > > > 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) merlin