Project

General

Profile

Actions

Bug #33532

closed

TYPO3 Backend is too slow if sys_log table is large

Added by Dmitry Dulepov about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #67449: Slow backend for systems/users with high amounts of sys_log entriesRejectedMorton Jonuschat2015-06-15

Actions
Actions

Also available in: Atom PDF