我有一个WordPress网站,其中有8000多个帖子,每当我添加一个新的WordPress站点时,该站点就会变得无响应。我检查了MySQL慢查询日志,发现它正在执行一次选择,该选择返回posts表中的大多数行,并且花费大量时间来执行。
这是一个例子:
Query_time: 149.702704
Lock_time: 0.000078
Rows_sent: 4699
Rows_examined: 9398
Rows_affected: 0
Rows_read: 4699
use 488726_wp;
SELECT `ID`, `post_author`, `post_date`, `post_date_gmt`, `post_status`, `post_name`, `post_modified`, `post_modified_gmt`, `post_parent`, `post_type`
FROM `wp_posts`
WHERE ( (post_status = 'publish' AND (post_type = 'post' OR post_type = ''))
OR (post_status = 'publish' AND post_type = 'page') )
AND post_password=''
ORDER BY post_modified DESC;
如何找到这些查询的来源?