# there is more to fetch, so set this high if ($sth->fetchrow_arrayref) { $extraFetch = 5000000; } else { $extraFetch = $numRowsDisplayed; }