Not a Perl solution, but look at LIMIT in the documentation for SELECT.
In reply to Re: very huge mysql request by Fletch in thread very huge mysql request by Anonymous Monk