-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.x
-
PHP Environment:
Database: MySQL(i) 5.1.32
When there are 300k of rows (Where from 200k are for the admin log) in the DB the query within the ACP will become slow.
When looking at the explain there is a filesort done with the query.
It also doesn't use a key by default.
Looking at the DB this is caused by that there is no index at log_time, while this is used by default as ORDER BY in the query.
Query that is affected:
SELECT l.*, u.username, u.username_clean, u.user_colour
|
FROM phpbb_log l, phpbb_users u
|
WHERE l.log_type = 0
|
AND u.user_id = l.user_id
|
ORDER BY l.log_time DESC
|
LIMIT 5
|