Slow Query while Caching Posts
-
Hi,
I’m facing some slowness while caching posts for the installation of RP.
Specifically, this query executes every few seconds while loading in the posts at the “Caching Posts” step.SELECT COUNT(p.ID) FROM wp_posts p LEFT JOIN wp_rp4wp_cache w ON w.post_id = p.ID WHERE p.post_type IN ('post') AND p.post_status = 'publish' AND w.post_id IS NULL;
The site in question has over 50k posts. I’ve temporarily adjusted wp_rp4wp_cache to be a MEMORY table, wp_posts is InnoDB. I’ve attempted to add some additional indexes (ID,post_type,post_status) and (post_type,post_status,ID) in order to speed up the query, but to no avail.
I suspect this slow query may be slowing down the index process. I’m curious if there might be other indexes or optimizations that can take place to reduce the server load during this caching process.
- The topic ‘Slow Query while Caching Posts’ is closed to new replies.