-
The sitemap generation feature of Rank Math seems to be the cause of significant server performance issues. The query posted below takes between 5 seconds and ~2 minutes to return. Our website (news) has 128,671 published posts and counting. The query is being run at varying intervals, peaking at ~20 queries per minute, and dropping to ~1-2 queries per minute when performance is poor.
We host on WPEngine on their P6 plan
Do you have any suggestions?
Query
SELECT l.ID, post_title, post_content, post_name, post_parent, post_author, post_modified_gmt, post_date, post_date_gmt, post_type FROM ( SELECT DISTINCT p.ID FROM wp_posts as p LEFT JOIN wp_postmeta AS pm ON ( p.ID = pm.post_id AND pm.meta_key = ? ) WHERE ( ( pm.meta_key = ? AND pm.meta_value NOT LIKE ? ) OR pm.post_id IS NULL ) AND p.post_type IN ( ? ) AND p.post_status = ? AND p.post_password = ? ORDER BY p.post_modified DESC LIMIT ? OFFSET ? ) o JOIN wp_posts l ON l.ID = o.ID
The ticket ‘Sitemap MySQL queries – significant performance hit’ is closed to new replies.