Batch the query instead of retrieving all users