-
Bug
-
Resolution: Won't Fix
-
Minor
-
3.0.11
-
None
When a topic is moved to another forum, move_topic() in functions_admin.php makes this call to update the forum_id of all drafts which are associated with that topic:
UPDATE phpbb_drafts |
SET forum_id = X |
WHERE topic_id = X; |
But the drafts table has no index on topic_id, so every row in the table must be examined:
# Query_time: 36.469295 Lock_time: 0.000037 Rows_sent: 0 Rows_examined: 93516
|
UPDATE phpbb_drafts |
SET forum_id = 17 |
WHERE topic_id = '1563997'; |
A new index on topic_id must be added to serve this efficiently.
Note that the existing indexes on the drafts table are poorly defined in general, which causes performance issues in other situations as well. Please see this ticket: http://tracker.phpbb.com/browse/PHPBB3-10712
- is related to
-
PHPBB-10712 Performance: Nearly every query against phpbb_drafts misses index
- Closed