Bug #12395
mod2/index.php stops mysql with slow query
| Status: | New | Start date: | 2011-01-20 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Bug | |||
| Target version: | - | |||
| Votes: | 0 |
Description
The SQL-Query in mod2/index.php -> function getMaximumNumberOfPosts() produces very high load on the mysql process, mysql has more than 100% cpu load in process list and finally stops the access to the server. We have a blog with more than 1.500 entries. The entry in our slow-queries-log is the following:
- Time: 110119 15:48:54
- User@Host: root[root] @ localhost []
- Query_time: 491.583351 Lock_time: 0.000649 Rows_sent: 0 Rows_examined: 346076411
use typo3;
SET timestamp=1295448534;
SELECT count(distinct tx_t3blog_post.uid) as counter FROM
tx_t3blog_post, tx_t3blog_post_cat_mm, tx_t3blog_cat WHERE
tx_t3blog_post.pid=1701 AND tx_t3blog_post.deleted=0 AND
tx_t3blog_post.uid IN (SELECT tx_t3blog_post.uid
FROM tx_t3blog_post, tx_t3blog_cat, tx_t3blog_post_cat_mm
WHERE tx_t3blog_post.uid = tx_t3blog_post_cat_mm.uid_local
AND tx_t3blog_cat.uid = tx_t3blog_post_cat_mm.uid_foreign) AND
tx_t3blog_post.deleted=0;