如何优化sql?
SELECT wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (7,8,14,104,134,234,289,331,4656,4657,6038,6039,6040,6085,6562,6563) )
AND wp_posts.post_type = \'post\'
AND (wp_posts.post_status = \'publish\'
OR wp_posts.post_status = \'private\')
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC
LIMIT 2480, 20
我使用了缓存和对象缓存。但随着一篇新文章的发布,缓存将失败,服务器负载将过高。这个问题已经困扰了很长一段时间,导致网站运行缓慢。