Limit size of result sets to avoid memory problems with 1GB php memory limit