Dear Monks,
I need to do a mysql request which returns thousends of rows. However I only need the first row. Which means my perl-script connects to the database, gives it the request, waits for 10 seconds and only retrieves the first element:
my $sth = $dbl->prepare($command) ;
$sth->execute() ;
my @row = $sth->fetchrow_array ;
$sth->finish ;
How can I change this request such that mysql only takes the first match and will spend less time thinking ? ( I need to do this request > 100000 times => it will take 278 hours ==> 11 days....)
Thanks a lot in advance
Luca