Avoid DoS on large datasets