in reply to Slow script: DBI, MySQL, or just too much data?

Well, probably the easiest way to at least see WHICH sql statements are taking the longest and other profiles of your db calls, turn on profiling:
$self->{'dbh'}->{Profile} = "DBI::ProfileDumper";
This will dump a dbi.prof file in the working dir that can be read with dbiprof to give you some good information as to exactly what is happening.