Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 90EEB64FD0B for ; Tue, 22 Jul 2008 08:32:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96190-01 for ; Tue, 22 Jul 2008 08:32:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web25803.mail.ukl.yahoo.com (web25803.mail.ukl.yahoo.com [217.12.10.188]) by postgresql.org (Postfix) with SMTP id E2C6264FD06 for ; Tue, 22 Jul 2008 08:32:30 -0300 (ADT) Received: (qmail 51024 invoked by uid 60001); 22 Jul 2008 11:32:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=QHi1K9hosfBdcllIDgNVYxnOODTXfAyiipr5+Lb0fGJpi9WfuwOa4xrLjNPaOYBQcxuJc7lkf2CMY8eJsmaC90OxrZdWl9Almd73w/LgOS5p6VHQA0ZyCxaRzWVYFY/hKjzvQih5Nj2eBLdTdoJx6WBU+W1NtyGIyqKtCu38D2k=; Received: from [85.189.172.41] by web25803.mail.ukl.yahoo.com via HTTP; Tue, 22 Jul 2008 11:32:28 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Tue, 22 Jul 2008 11:32:28 +0000 (GMT) From: Valentin Bogdanov Reply-To: valiouk@yahoo.co.uk Subject: Re: Perl/DBI vs Native To: pgsql-performance@postgresql.org In-Reply-To: <04db0f32170da679850a07d8b127e3b6@biglumber.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <698916.49812.qm@web25803.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=0 required=5 tests=SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200807/203 X-Sequence-Number: 30803 Thanks to everyone who replied. There were some really good points. However, I found what is causing the difference. The perl program was conne= cting to the database via a TCP socket while the C version was using Unix s= ocket. I changed the connect in my perl script, so that it now uses Unix so= ckets as well. Run the tests again and got identical results for both progr= ams. In case someone is wondering, the way to force DBI to use unix sockets is b= y not specifying a host and port in the connect call. Cheers, Val=0A=0A=0A _________________________________________________________= _=0ANot happy with your email address?.=0AGet the one you really want - mil= lions of new email addresses available now at Yahoo! http://uk.docs.yahoo.c= om/ymail/new.html