http://www.perlmonks.org?node_id=688222


in reply to Re: A profiling surprise ...
in thread A profiling surprise ...

More specifically, shift the IO burden away from the connection between your program and the database.

I'm sure there are other monks with even better advice, but these will help quite a bit.

UPDATE: fixed thinko s/WHEN/WHERE/ (thanks, kyle, for pointing that out in a msg).