From: Valentin Bogdanov <valiouk@yahoo.co.uk>
To: pgsql-performance@postgresql.org
Subject: Re: Perl/DBI vs Native
Date: Tue, 22 Jul 2008 11:32:28 +0000 (GMT)
Message-ID: <698916.49812.qm@web25803.mail.ukl.yahoo.com> (raw)
In-Reply-To: <04db0f32170da679850a07d8b127e3b6@biglumber.com>
Thanks to everyone who replied. There were some really good points.
However, I found what is causing the difference. The perl program was connecting to the database via a TCP socket while the C version was using Unix socket. I changed the connect in my perl script, so that it now uses Unix sockets as well. Run the tests again and got identical results for both programs.
In case someone is wondering, the way to force DBI to use unix sockets is by not specifying a host and port in the connect call.
Cheers,
Val
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: valiouk@yahoo.co.uk
Subject: Re: Perl/DBI vs Native
In-Reply-To: <698916.49812.qm@web25803.mail.ukl.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox