in reply to How to Speed up MySQL w/ Perl

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.


___________
Eric Hodges

Replies are listed 'Best First'.
Re: Re: How to Speed up MySQL w/ Perl
by rsiedl (Friar) on May 26, 2004 at 13:59 UTC
    Hey Eric,

    I was just using "value" as a descriptive term for what would be a variable.

    Cheers,
    Reagen