I could be wrong but it looks like you are running a select where the colum 'Data' = 'value', and then looping threw and storing the values of the Data colum.. Won't all the values of 'Data' be 'value' since thats what you queried for?
my %DataHash; #get all values where the 'Data' colume = 'value'...? my $sth = $dbh->prepare(" select ID, Data from table_name where Data=\ +"value\" "); $sth->execute; while ( my ( $ID, $Data) = $sth->fetchrow ) { $CountryDisplay{$ID} = "$Data"; # storing Data colum } # end-while $sth->finish
I don't see the point in this whole loop in that case. I dunno if this was just because of the way you made the script smaller or what but I thought i would point it out.
In reply to Re: How to Speed up MySQL w/ Perl
by eric256
in thread How to Speed up MySQL w/ Perl
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |