Problems with Slow Queries
-
I’ve done some quick searches on this and I haven’t really found anything. So, I’m hoping someone out there has some ideas. My host has locked my database a couple of times because of slow queries examing something like 700,000+ rows with only 94 returned. I don’t know what that means, but here’s the snippet they sent me from the query log.
'# Query_time: 13 Lock_time: 0 Rows_sent: 94 Rows_examined: 769333
SELECT cat_ID, cat_name, category_nicename,category_parent,
COUNT(wp_post2cat.post_id) AS cat_count,
DAYOFMONTH(MAX(post_date)) AS lastday,
MONTH(MAX(post_date)) AS lastmonth
FROM wp_categories LEFT JOIN wp_post2cat ON (cat_ID =
category_id)
LEFT JOIN wp_posts ON (ID = post_id)
WHERE cat_ID > 0
GROUP BY cat_ID HAVING cat_count > 0 ORDER BY cat_name
asc, post_date DESC;'Can anyone make heads or tales of this? I realize the wp_post2cat table is probabl left over from the Cat2 tag plugin I was running before upgrading to 2.0. I’m no longer runnign the plugin. Could WordPress still be querying the table? Could that be the problem? Should I drop the table?
The only other database-related plugins I’m runnign are:
- Akismet
- Brian’s Latest Comments
- Drop Down Get Links
- Link’s Page
- Mini-Posts
- Nice Related Posts
- Random Quotes
I can disable some of these and see what happens, but if anyone knows about any related problems with any of these, it would be a big help.
- The topic ‘Problems with Slow Queries’ is closed to new replies.