seit geraumer Zeit fällt mir auf das ein Query in viewforum.php (seite xxx) sehr lange brauch um Ergebnisse zu liefern:
Code: Alles auswählen
explain SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.post_text, pt.bbcode_uid
FROM phpbbboard_topics t, phpbbboard_users u, phpbbboard_posts p, phpbbboard_posts p2, phpbbboard_users u2, phpbbboard_posts_text pt
WHERE t.forum_id = 8
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND p2.post_id = pt.post_id
AND u2.user_id = p2.poster_id
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC LIMIT 12775, 25;
Code: Alles auswählen
+----+-------------+-------+--------+-------------------+----------+---------+----------------------------------+-------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+-------------------+----------+---------+----------------------------------+-------+-----------------------------+
| 1 | SIMPLE | t | ref | forum_id | forum_id | 2 | const | 11169 | Using where; Using filesort |
| 1 | SIMPLE | u | eq_ref | PRIMARY | PRIMARY | 3 | db65681789.t.topic_poster | 1 | |
| 1 | SIMPLE | p | eq_ref | PRIMARY | PRIMARY | 3 | db65681789.t.topic_first_post_id | 1 | |
| 1 | SIMPLE | p2 | eq_ref | PRIMARY,poster_id | PRIMARY | 3 | db65681789.t.topic_last_post_id | 1 | |
| 1 | SIMPLE | u2 | eq_ref | PRIMARY | PRIMARY | 3 | db65681789.p2.poster_id | 1 | |
| 1 | SIMPLE | pt | eq_ref | PRIMARY | PRIMARY | 3 | db65681789.p2.post_id | 1 | |
+----+-------------+-------+--------+-------------------+----------+---------+----------------------------------+-------+-----------------------------+
vielleicht hat jemand ne idee

Gruss