X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D13FD9E27 for ; Mon, 3 Oct 2005 18:51:15 -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 45371-10 for ; Mon, 3 Oct 2005 21:51:12 +0000 (GMT) Received: from smtp.nildram.co.uk (smtp.nildram.co.uk [195.112.4.54]) by svr1.postgresql.org (Postfix) with ESMTP id 75E48D9E0E for ; Mon, 3 Oct 2005 18:51:13 -0300 (ADT) Received: from 192.168.0.3 (unknown [84.12.188.233]) by smtp.nildram.co.uk (Postfix) with ESMTP id C0E4D250DD5; Mon, 3 Oct 2005 22:51:11 +0100 (BST) Subject: Re: [PERFORM] A Better External Sort? From: Simon Riggs To: Martijn van Oosterhout Cc: Tom Lane , Ron Peacetree , pgsql-hackers@postgresql.org In-Reply-To: <20051002193835.GJ30492@svana.org> References: <18329659.1128188552696.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> <20051001215602.GG13830@svana.org> <29837.1128223567@sss.pgh.pa.us> <20051002123240.GA30492@svana.org> <20051002193835.GJ30492@svana.org> Content-Type: text/plain Organization: 2nd Quadrant Date: Mon, 03 Oct 2005 22:51:32 +0100 Message-Id: <1128376292.8603.142.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.066 required=5 tests=[AWL=0.016, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/124 X-Sequence-Number: 73983 On Sun, 2005-10-02 at 21:38 +0200, Martijn van Oosterhout wrote: > Ok, I tried two optimisations: > > 2. By specifying: -Winline -finline-limit-1500 (only on tuplesort.c). > This causes inlineApplySortFunction() to be inlined, like the code > obviously expects it to be. > > default build (baseline) 235 seconds > -finline only 217 seconds (7% better) > comparetup_index_fastbyval4 only 221 seconds (6% better) > comparetup_index_fastbyval4 and -finline 203 seconds (13.5% better) > > This is indexing the integer sequence column on a 2.7 million row > table. The times are as given by gprof and so exclude system call time. > > Basically, I recommend adding "-Winline -finline-limit-1500" to the > default build while we discuss other options. I add -Winline but get no warnings. Why would I use -finline-limit-1500? I'm interested, but uncertain as to what difference this makes. Surely using -O3 works fine? Best Regards, Simon Riggs