I bet a bunch of the Pg code could be improved. I looked through it and spotted a couple of examples of less than efficient coding that make me think that the Pg code could be improved somewhat without resorting to C. OTOH, MySQL appears to have a better structure to its client code and XS. For instance the MySQL do() statement does everythign in C, where the Pg code does an awful lot of method calls. Assuming each subroutine call has a measurable overhead to it, its clear that the ~300100 calls that occur under MySQL are going to be more efficient that the ~4.2 million calls that DBD::Pg does for the same thing. And in the latter case the calls are primarily method lookups which are even slower than subroutine calls.
Pruning the call tree graph involved in a do() statement would be the first place id look. Getting rid of the dependency on DBI::st would also seem prudent.
In reply to Re: Why is DBD::Pg slower than DBD::mysql?
by demerphq
in thread Why is DBD::Pg slower than DBD::mysql?
by danb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |