Skip site navigation (1) Skip section navigation (2)

Re: DBD::Pg performance bites compared to DBD::mysql?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: DBD::Pg performance bites compared to DBD::mysql?
Date: 2005-08-22 00:20:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Hash: SHA1

> I'm not any kind of Perl module guru, but it looks to me like the
> explanation for the discrepancy is that much of DBD::mysql is written
> in C while the equivalent code in DBD::Pg is written in Perl.  This is
> killing us for any app written in Perl :-( --- the above trace only
> shows a factor of 2 total penalty, but I've seen up to a factor of 4 in
> other cases.  There is no way that a client-side driver should be taking
> several times longer than the backend to process a SQL command :-(
> Can anyone who knows more about Perl confirm or deny?
> Anyone want to step up to fix it?

I can't imagine that it was causing a factor of 2 difference, but I've
changed the code in DBD::Pg to make do() a lot smarter, for brain-dead
benchmarks such as MySQL's that use do() instead of prepare/execute
like they should. In short, DBD::Pg will short-circuit a lot of the usual
work and call PQexec directly if it can get away with it, which should
make the profile Tom posted look a lot better. It also avoids overhead of
going through, and is all C/XS code now. Hopefully, this should
make the benchmarking results a little more fair. :) This is now in
cvs, and will be part of the upcoming version 1.44 of DBD::Pg.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200508212016


In response to


pgsql-interfaces by date

Next:From: Tom LaneDate: 2005-08-22 01:25:56
Subject: Re: DBD::Pg performance bites compared to DBD::mysql?
Previous:From: Alvaro HerreraDate: 2005-08-20 03:29:32
Subject: Re: <IDLE> in transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group