X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 38CC39FA5FB for ; Thu, 11 May 2006 19:05:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94420-09 for ; Thu, 11 May 2006 19:05:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 1AB799F9F2E for ; Thu, 11 May 2006 19:05:26 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id EBC5B56437; Thu, 11 May 2006 17:05:24 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 11 May 2006 17:05:23 -0500 Date: Thu, 11 May 2006 17:05:23 -0500 From: "Jim C. Nasby" To: Adam Palmblad Cc: pgsql-performance@postgresql.org Subject: Re: Dynamically loaded C function performance Message-ID: <20060511220523.GT99570@pervasive.com> References: <6B5AF6293A289F45826220B17ABE79370D5ED7@BORON.aers.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6B5AF6293A289F45826220B17ABE79370D5ED7@BORON.aers.local> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060511:apalmblad@dataunison.com::t2BD6Lyng8GN625h:0000000000000 000000000000000000000000EPUU X-Hashcash: 1:20:060511:pgsql-performance@postgresql.org::IykQHeSWuXP3I1Lz:00000 0000000000000000000000004CS1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/303 X-Sequence-Number: 19090 On Fri, May 05, 2006 at 03:47:53PM -0700, Adam Palmblad wrote: > Hi, > We've got a C function that we use here and we find that for every > connection, the first run of the function is much slower than any > subsequent runs. ( 50ms compared to 8ms) > > Besides using connection pooling, are there any options to improve > performance? In my experience, connection startup takes a heck of a lot longer than 50ms, so why are you worrying about 50ms for the first run of a function? BTW, sorry, but I don't know a way to speed this up, either. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461