http://www.perlmonks.org?node_id=844537


in reply to DBI AoArefs dereference

If you can change sql query, add "LIMIT = 10" clause (it is, in my opinion, best for performance), otherwise you can use
my $AoA = $dbh->selectall_arrayref($sql, {MaxRows=>10}, @sqlparams);