Project

General

Profile

Actions

Bug #67449

closed

Slow backend for systems/users with high amounts of sys_log entries

Added by Nils Blattner almost 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Must have
Category:
Performance
Target version:
Start date:
2015-06-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Hi there

If a system/user has a lot of sys_log entries associated, the backend for that user becomes unbearably slow (20s+ for 250k entries). The reason behind this is a query in typo3/sysext/core/Classes/DataHandling/DataHandler.php:

6.2.9 line 7313: $res_log = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'type=1 AND userid=' . (int)$this->BE_USER->user['uid'] . ' AND tstamp=' . (int)$GLOBALS['EXEC_TIME'] . ' AND error<>0');

Because there is no index over error, the query cannot be optimized properly. When adding an index over "error", the speed is is improved dramatically (20s => 1s) and if I add an index over type, userid, tstamp and error, the query obviously is sped up even more dramatically (<0.01s).

ALTER TABLE `sys_log`
ADD INDEX `print_error_log` (`type`, `userid`, `tstamp`, `error`);

Kind regards
Nils


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #33532: TYPO3 Backend is too slow if sys_log table is largeClosedDmitry Dulepov2012-01-30

Actions
Actions

Also available in: Atom PDF