Re: [PERFORM] Perl/DBI vs Native

2008-07-23 Thread Valentin Bogdanov
, Jeffrey Baker <[EMAIL PROTECTED]> wrote: > From: Jeffrey Baker <[EMAIL PROTECTED]> > Subject: Re: [PERFORM] Perl/DBI vs Native > To: "Greg Sabino Mullane" <[EMAIL PROTECTED]> > Cc: pgsql-performance@postgresql.org > Date: Tuesday, 22 July, 2008, 9:35 PM >

Re: [PERFORM] Perl/DBI vs Native

2008-07-22 Thread Jeffrey Baker
On Tue, Jul 22, 2008 at 9:48 AM, Greg Sabino Mullane <[EMAIL PROTECTED]> wrote: >> 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. > > Actually, the host defaults to the local socket. Using the port > may still be n

Re: [PERFORM] Perl/DBI vs Native

2008-07-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > 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. Actually, the host defaults to the local socket. Using the port may still be needed: if you leave it out, it si

Re: [PERFORM] Perl/DBI vs Native

2008-07-22 Thread Valentin Bogdanov
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 sock

Re: [PERFORM] Perl/DBI vs Native

2008-07-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Tom Lane wrote: > Sure, but so does psql (unless you've turned on the magic FETCH_COUNT > setting). I think the theories about prepared versus literal statements > were more promising; but I don't know DBI well enough to know exactly > what it

Re: [PERFORM] Perl/DBI vs Native

2008-07-21 Thread Tom Lane
Craig James <[EMAIL PROTECTED]> writes: > Valentin Bogdanov wrote: >> I have ran quite a few tests comparing how long a query takes to >> execute from Perl/DBI as compared to psql/pqlib. No matter how many >> times I run the test the results were always the same. >> >> I run a SELECT all on a fai

Re: [PERFORM] Perl/DBI vs Native

2008-07-21 Thread Craig James
Valentin Bogdanov wrote: I have ran quite a few tests comparing how long a query takes to execute from Perl/DBI as compared to psql/pqlib. No matter how many times I run the test the results were always the same. I run a SELECT all on a fairly big table and enabled the log_min_duration_statement

Re: [PERFORM] Perl/DBI vs Native

2008-07-21 Thread Rusty Conover
On Jul 21, 2008, at 5:19 AM, Valentin Bogdanov wrote: Hi, I have ran quite a few tests comparing how long a query takes to execute from Perl/DBI as compared to psql/pqlib. No matter how many times I run the test the results were always the same. I run a SELECT all on a fairly big table a

Re: [PERFORM] Perl/DBI vs Native

2008-07-21 Thread Craig Ringer
Valentin Bogdanov wrote: Hi, I have ran quite a few tests comparing how long a query takes to execute from Perl/DBI as compared to psql/pqlib. No matter how many times I run the test the results were always the same. I run a SELECT all on a fairly big table and enabled the log_min_duration_s

[PERFORM] Perl/DBI vs Native

2008-07-21 Thread Valentin Bogdanov
Hi, I have ran quite a few tests comparing how long a query takes to execute from Perl/DBI as compared to psql/pqlib. No matter how many times I run the test the results were always the same. I run a SELECT all on a fairly big table and enabled the log_min_duration_statement option. With psql