wp_comments table really big casuing /wp-admin/edit-comments.php to slowly load

Was able to fix it by putting this in functions.php

// fix query timeout in wp-admin/edit-comment.php page
add_action('pre_get_comments', 'pre_get_comments_any_status');
function pre_get_comments_any_status($comment_query) {
  if (empty($comment_query->query_vars['status'])) {
    $comment_query->query_vars['status'] = 'any';
  }
}