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 D8493D6815 for ; Tue, 8 Nov 2005 16:48:45 -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 17309-02 for ; Tue, 8 Nov 2005 20:48:43 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 7BF60D6805 for ; Tue, 8 Nov 2005 16:48:44 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 09B8835630; Tue, 8 Nov 2005 12:48:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id C91743562E; Tue, 8 Nov 2005 12:48:45 -0800 (PST) Date: Tue, 8 Nov 2005 12:48:45 -0800 (PST) From: Stephan Szabo To: Luke Lonergan Cc: Simon Riggs , Kurt Harriman , pgsql-performance@postgresql.org Subject: Re: Sort performance on large tables In-Reply-To: Message-ID: <20051108124255.Y43056@megazone.bigpanda.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE 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/144 X-Sequence-Number: 15401 On Tue, 8 Nov 2005, Luke Lonergan wrote: > Stephan, > > On 11/8/05 9:38 AM, "Stephan Szabo" wrote: > > >> > > >> > Just as we find with a similar comparison (with a "popular commercia= l, > >> > proprietary database" :-) Though some might suggest you increase > >> > work_mem or other tuning suggestions to speed sorting, none work. I= n > >> > fact, we find that increasing work_mem actually slows sorting slight= ly. > > > > I wish you'd qualify your statements, because I can demonstrably show t= hat > > I can make sorts go faster on my machine at least by increasing work_me= m > > under some conditions. > > > Cool =AD can you provide your test case please? I probably should have added the wink smiley to make it obvious I was talking about the simplest case, things that don't fit in work_mem at the current level but for which it's easy to raise work_mem to cover. It's not a big a gain as one might hope, but it does certainly drop again. > Recognize also that we=B9re looking for a factor of 10 or more improvemen= t > here =AD this is not a small increase that=B9s needed. I agree that we definately need help on that regard. I do see the effect where raising work_mem lowers the performance up until that point. I just think that it requires more care in the discussion than disregarding the suggestions entirely especially since people are going to see this in the archives.