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 93E88D9F4B for ; Tue, 4 Oct 2005 09:26:02 -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 13864-09 for ; Tue, 4 Oct 2005 12:24:58 +0000 (GMT) Received: from svana.org (svana.org [203.20.62.76]) by svr1.postgresql.org (Postfix) with ESMTP id 9F856D72AA for ; Tue, 4 Oct 2005 09:25:00 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian)) id 1EMlqh-0005fr-00; Tue, 04 Oct 2005 22:24:47 +1000 Date: Tue, 4 Oct 2005 14:24:46 +0200 From: Martijn van Oosterhout To: Simon Riggs Cc: Tom Lane , Ron Peacetree , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] A Better External Sort? Message-ID: <20051004122443.GF17589@svana.org> Reply-To: Martijn van Oosterhout 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> <1128376292.8603.142.camel@localhost.localdomain> <20051004100441.GC17589@svana.org> <1128425094.8603.296.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6v9BRtpmy+umdQlo" Content-Disposition: inline In-Reply-To: <1128425094.8603.296.camel@localhost.localdomain> User-Agent: Mutt/1.3.28i X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/169 X-Sequence-Number: 74028 --6v9BRtpmy+umdQlo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 04, 2005 at 12:24:54PM +0100, Simon Riggs wrote: > How did you determine the 1500 figure? Can you give some more info to > surround that recommendation to allow everybody to evaluate it? kleptog@vali:~/dl/cvs/pgsql-local/src/backend/utils/sort$ gcc -finline-limi= t-1000 -Winline -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labe= ls -fno-strict-aliasing -g -I../../../../src/include -D_GNU_SOURCE -c -o = tuplesort.o tuplesort.c tuplesort.c: In function 'applySortFunction': tuplesort.c:1833: warning: inlining failed in call to 'inlineApplySortFunct= ion' tuplesort.c:1906: warning: called from here tuplesort.c: In function 'comparetup_heap': tuplesort.c:1833: warning: inlining failed in call to 'inlineApplySortFunct= ion' tuplesort.c:1937: warning: called from here tuplesort.c: In function 'comparetup_index': tuplesort.c:1833: warning: inlining failed in call to 'inlineApplySortFunct= ion' tuplesort.c:2048: warning: called from here tuplesort.c: In function 'comparetup_datum': tuplesort.c:1833: warning: inlining failed in call to 'inlineApplySortFunct= ion' tuplesort.c:2167: warning: called from here kleptog@vali:~/dl/cvs/pgsql-local/src/backend/utils/sort$ gcc -finline-limi= t-1500 -Winline -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labe= ls -fno-strict-aliasing -g -I../../../../src/include -D_GNU_SOURCE -c -o = tuplesort.o tuplesort.c A quick binary search puts the cutoff between 1200 and 1300. Given version variation I picked a nice round number, 1500. Ugh, that's for -O2, for -O3 and above it needs to be 4100 to work. Maybe we should go for 5000 or so. I'm using: gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. --6v9BRtpmy+umdQlo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFDQnSKIB7bNG8LQkwRAgpdAJ4u+KmNpMaHY/WknCkvep4N5YGL3QCfS2qR OU90plt1mOZZ9UjVH/9oTeI= =Axn9 -----END PGP SIGNATURE----- --6v9BRtpmy+umdQlo--