Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EEFF1632311 for ; Wed, 7 Jul 2010 16:42:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 19988-04 for ; Wed, 7 Jul 2010 19:42:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh4.mail.rice.edu (mh4.mail.rice.edu [128.42.199.11]) by mail.postgresql.org (Postfix) with ESMTP id B10B96322D7 for ; Wed, 7 Jul 2010 16:42:39 -0300 (ADT) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id CB66437000E; Wed, 7 Jul 2010 14:42:37 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.0 at mh4.mail.rice.edu Received: from mh4.mail.rice.edu ([127.0.0.1]) by mh4.mail.rice.edu (mh4.mail.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8j1wg2fEJYPa; Wed, 7 Jul 2010 14:42:37 -0500 (CDT) Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh4.mail.rice.edu (Postfix) with ESMTP id 9458C370005; Wed, 7 Jul 2010 14:42:37 -0500 (CDT) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 4944A2D5A6; Wed, 7 Jul 2010 14:42:37 -0500 (CDT) Date: Wed, 7 Jul 2010 14:42:36 -0500 From: Kenneth Marshall To: Eliot Gable Cc: Tom Lane , Joe Conway , Robert Haas , Merlin Moncure , Craig Ringer , Craig James , pgsql-performance@postgresql.org Subject: Re: Highly Efficient Custom Sorting Message-ID: <20100707194236.GQ341@aart.is.rice.edu> References: <4C338B61.60409@joeconway.com> <18550.1278454884@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.311 tagged_above=-10 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/94 X-Sequence-Number: 39483 Hi Eliot, Would you mind posting your code for reference. It is nice to have working examples when trying to figure out how it all fits together. Regards, Ken On Wed, Jul 07, 2010 at 03:23:12PM -0400, Eliot Gable wrote: > Thanks again for all the input and suggestions from people. I have this > sorting algorithm re-implemented in C now and it is somewhere <2ms to run it > now; though it is difficult to get a more accurate measure. There may be > some additional optimizations I can come up with, but for now, this will > work very well compared to the alternative methods. > > On Tue, Jul 6, 2010 at 6:21 PM, Tom Lane wrote: > > > Eliot Gable > > > writes: > > > Do I need to somehow force the server to unload and then re-load this .so > > > file each time I build a new version of it? If so, how do I do that? > > > > Start a new database session. > > > > regards, tom lane > > > > > > -- > Eliot Gable > > "We do not inherit the Earth from our ancestors: we borrow it from our > children." ~David Brower > > "I decided the words were too conservative for me. We're not borrowing from > our children, we're stealing from them--and it's not even considered to be a > crime." ~David Brower > > "Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to live; not > live to eat.) ~Marcus Tullius Cicero