CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #12395

mod2/index.php stops mysql with slow query

Added by Matthias Haeger over 2 years ago.

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:

  1. Time: 110119 15:48:54
  2. User@Host: root[root] @ localhost []
  3. 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;

Also available in: Atom PDF