On Tue, 14 Dec 2004, Tim Bunce wrote:

> On Tue, Dec 14, 2004 at 02:54:39PM +0900, [EMAIL PROTECTED] wrote:
> > Hi.
> > 
> > >> >http://search.cpan.org/~mergl/pgsql_perl5-1.9.0/
> > >> Well,newer Pg.pm will be found here:
> > >> 
> > >>  http://gborg.postgresql.org/project/pgperl/projdisplay.php
> > 
> > >> But
> > >> >> I'm working with Perl and PostgreSQL  using DBD::Pg and Pg and
> > >> >> noticied that  Pg is 40% faster than DBD::Pg.
> > >> I can't belive this before testing by myself.
> > >> Is there anymore information about those bench mark?
> > >
> > > I can, for it all depends on how the benchmarking is done, and I'd 
> > > have to say, who cares if Pg is 40% faster? 
> 
> I do! The DBI is designed to be very fast. Speed should never be a

You are right. I just don't trust benchmarks, and I somehow doubt that the
overall performance (in real-world-situations) of DBD::Pg is that bad; however,
For a simple application just loading DBI/DBD::Pg would probably give Pg a 40%
run time advantange. Not to mention that $dbh->do("Select 1"); would probably be
at least 50% slower because DBD::Pg does scan of the statement and placeholder
parsing &c before sending it to PostgreSQL.


> Assuming that the "40% faster" relates mainly to fetching then
> here's a quick review of the relevant code...

I was assuming that that number had to do with prepare -- which I know to be
much slower :)

A quick benchmark (1,100,100K rows, 5 cols, varchar 128, random length data) of
the fetch code shows the runtime to be almost the same, I'll play with it some
more, but if you want I can send the code up to dbi-dev.

> p.s. If anyone wants to discuss the code more then please change
> dbi-users to dbi-dev in the CC list. Thanks.

Okay.

Rudy.

Reply via email to