X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A4C98D1B1E0 for ; Tue, 20 Jul 2004 14:21:06 -0300 (ADT) 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 19121-10 for ; Tue, 20 Jul 2004 17:21:05 +0000 (GMT) Received: from trofast.sesse.net (trofast.sesse.net [129.241.93.32]) by svr1.postgresql.org (Postfix) with ESMTP id 147EAD1B18A for ; Tue, 20 Jul 2004 14:21:00 -0300 (ADT) Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1BmyIW-0005oh-00 for ; Tue, 20 Jul 2004 19:21:00 +0200 Date: Tue, 20 Jul 2004 19:21:00 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: Odd sorting behaviour Message-ID: <20040720172100.GA22262@uio.no> References: <20040708101913.GA15871@uio.no> <20040715120854.GA31259@uio.no> <20040720115116.GB19633@uio.no> <200407201006.08649.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200407201006.08649.josh@agliodbs.com> X-Operating-System: Linux 2.6.6 on a i686 User-Agent: Mutt/1.5.6+20040523i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/131 X-Sequence-Number: 7522 On Tue, Jul 20, 2004 at 10:06:08AM -0700, Josh Berkus wrote: > Actually, quick question -- have you tried setting enable_mergjoin=false to > see the plan the system comes up with? Is it in fact faster? It is significantly faster -- 1200ms vs. 1900ms (on 7.4, at least). Some of the merge joins are changed to nested loop joins, though, which probably reduces the overall performance, so I guess there's more to gain if I can get it to convert only that merge join to a hash join. The sum and multiplication parts still take 400ms or so, though (is this normal? :-) ), so I guess there's a lower limit :-) I could of course post the updated query plan if anybody is interested; let me know. (The data is still available if anybody needs it as well, of course.) /* Steinar */ -- Homepage: http://www.sesse.net/