Our wp_comments has millions of rows.
When we load /wp/wp-admin/edit-comments.php
it would timeout.
Looking at mysql, this simple query is taking a long time
SELECT wp_comments.comment_ID FROM wp_comments
WHERE ( ( comment_approved = '0' OR comment_approved = '1' ) )
AND comment_type IN ('pingback', 'trackback')
ORDER BY wp_comments.comment_date_gmt
DESC LIMIT 0,1;
Is there away to edit the edit-comments.php
comment dashboard to work only on comments for the last year instead of every commens in the table?