in reply to How to Speed up MySQL w/ Perl

beyond the perl considerations raised above, spend some time making the mysql side go faster, too:
(1) Don't grab more data than you need.
(2) Make sure you have an appropriate index to get that data without scanning too many rows.
(3) run 'EXPLAIN SELECT' to see how the optimizer is doing your query.
(4) look at Jeremy Zawodny's new book; it is very good