-----BEGIN PGP SIGNED MESSAGE-----
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 Pg.pm, 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@turnstep.com
PGP Key: 0x14964AC8 200508212016
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFDCRoBvJuQZxSWSsgRAlb7AJ9IfY1fmxRoib1Bct4HCHRi6WoCCwCfQjmk
oqhEPn8SzwcEe9SouwEUD2s=
=eKgZ
-----END PGP SIGNATURE-----