Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 502DB9FB27F for ; Sun, 14 Jan 2007 12:12:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 28779-01 for ; Sun, 14 Jan 2007 12:12:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from globalrelay.com (mail1.globalrelay.com [204.92.49.200]) by postgresql.org (Postfix) with ESMTP id 8963C9FB1F0 for ; Sun, 14 Jan 2007 12:12:27 -0400 (AST) X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway X-GR-Acctd: YES Received: from [71.215.208.64] (HELO DaveEMachine) by globalrelay.com (CommuniGate Pro SMTP 4.2.3) with ESMTP id 122561273; Sun, 14 Jan 2007 08:12:51 -0800 From: "Dave Dutcher" To: =?iso-8859-1?Q?'Rolf_=D8stvik_=28HA/EXA=29'?= , Subject: Re: Problem with grouping, uses Sort and GroupAggregate, HashAggregate is better(?) Date: Sun, 14 Jan 2007 10:12:18 -0600 Message-ID: <011e01c737f6$c449c580$8300a8c0@tridecap.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: Acc32aC6muAHlnKZSzKThbS58UdeegAG+oAA In-Reply-To: Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.449 tagged_above=0 required=5 tests=AWL, BAYES_60 X-Spam-Level: X-Archive-Number: 200701/223 X-Sequence-Number: 22824 > -----Original Message----- > From: pgsql-performance-owner@postgresql.org=20 > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of=20 > Rolf =D8stvik (HA/EXA) Have you tried "set enable_sort=3Doff" with 8.1.2? I'm not sure if that = will change anything because it has to do at least one sort. Its just a lots faster to do a hashagg + small sort than one big sort in this case. (I wonder if there should be enable_groupagg?) =20