X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F11CDD8EE1 for ; Tue, 8 Nov 2005 13:55:59 -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 67786-02 for ; Tue, 8 Nov 2005 17:55:57 +0000 (GMT) X-Greylist: delayed 00:17:34.809212 by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 55698D8EB7 for ; Tue, 8 Nov 2005 13:55:57 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id D4B5E35512; Tue, 8 Nov 2005 09:38:21 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id D30C6354F1; Tue, 8 Nov 2005 09:38:21 -0800 (PST) Date: Tue, 8 Nov 2005 09:38:21 -0800 (PST) From: Stephan Szabo To: Luke Lonergan Cc: Charlie Savage , pgsql-performance@postgresql.org Subject: Re: Sort performance on large tables In-Reply-To: <3E37B936B592014B978C4415F90D662D0193B9F0@MI8NYCMAIL06.Mi8.com> Message-ID: <20051108093500.N31541@megazone.bigpanda.com> References: <3E37B936B592014B978C4415F90D662D0193B9F0@MI8NYCMAIL06.Mi8.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/142 X-Sequence-Number: 15399 On Tue, 8 Nov 2005, Luke Lonergan wrote: > > SELECT tlid, min(ogc_fid) > > FROM completechain > > GROUP BY tlid > > ORDER BY tlid; > > > > Even with this, it was more than a magnitude faster than Postgresql. > > Which makes me think I have somehow misconfigured postgresql > > (see the relevant parts of postgresql.conf below). > > Just as we find with a similar comparison (with a "popular commercial, > proprietary database" :-) Though some might suggest you increase > work_mem or other tuning suggestions to speed sorting, none work. In > fact, we find that increasing work_mem actually slows sorting slightly. I wish you'd qualify your statements, because I can demonstrably show that I can make sorts go faster on my machine at least by increasing work_mem under some conditions.