[TASK] Add sql index for error counter in topbar 07/59707/4
authorChristoph Lehmann <christoph.lehmann@networkteam.com>
Fri, 15 Feb 2019 13:45:50 +0000 (14:45 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 22 Mar 2019 21:24:21 +0000 (22:24 +0100)
The index reduces the sql query time and thus is a performance improvement.

On a table with 5 million rows the query time is ~ 38s without and less than 0.5s with the index

Resolves: #87723
Releases: master
Change-Id: I53b24ad0d09a2627a77720ec151dea30a14f5011
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59707
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Tested-by: Fabien Udriot <fabien.udriot@ecodev.ch>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Fabien Udriot <fabien.udriot@ecodev.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/ext_tables.sql

index d8273fe..5854072 100644 (file)
@@ -418,7 +418,8 @@ CREATE TABLE sys_log (
        KEY recuidIdx (recuid),
        KEY user_auth (type,action,tstamp),
        KEY request (request_id),
-       KEY combined_1 (tstamp, type, userid)
+       KEY combined_1 (tstamp, type, userid),
+       KEY errorcount (tstamp,error)
 ) ENGINE=InnoDB;
 
 #