Actions
Bug #33532
closedTYPO3 Backend is too slow if sys_log table is large
Status:
Closed
Priority:
Must have
Assignee:
Category:
Performance
Target version:
Start date:
2012-01-30
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
A query is executed during the login process, which can take minutes during the BE login if the sys_log table is too large. Here is the analysis of the query:
mysql> explain SELECT tstamp FROM sys_log WHERE type=255 AND action=4 AND tstamp>1327922390 ORDER BY tstamp DESC limit 1; +----+-------------+---------+------+---------------+------+---------+------+----------+-----------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------+------+---------------+------+---------+------+----------+-----------------------------+ | 1 | SIMPLE | sys_log | ALL | NULL | NULL | NULL | NULL | 13319619 | Using where; Using filesort | +----+-------------+---------+------+---------------+------+---------+------+----------+-----------------------------+ 1 row in set (0.06 sec)
In the process list:
mysql> show processlist; +---------+---------------+-----------+---------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +---------+---------------+-----------+---------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+ | 4794573 | xxx | localhost | xxx | Query | 455 | Sorting result | SELECT tstamp FROM sys_log WHERE type=255 AND action=4 AND tstamp>1327922390 ORDER BY tstamp DESC LI |
A proper index would prevent an issue.
Actions