[BUGFIX] TYPO3 Backend is too slow if sys_log table is large
authorDmitry Dulepov <dmitry@typo3.org>
Mon, 30 Jan 2012 13:15:55 +0000 (15:15 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 10 Feb 2012 14:07:20 +0000 (15:07 +0100)
A query is executed during the login process, which can take
minutes during the BE login if the sys_log table is too large.
The query does not use any indexes, operates on the whole table
and uses "filesort". Implementing a proper index solves the
performance issue.

Change-Id: I8f80ed9490d94fb7a318fec687a9ba1ab6e187fe
Fixes: #33532
Releases: 4.7
Reviewed-on: http://review.typo3.org/8771
Reviewed-by: Oliver Klee
Reviewed-by: Stefan Galinski
Tested-by: Stefan Galinski
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Philipp Gampe

index a0fc1c6..64edf41 100644 (file)
@@ -382,7 +382,8 @@ CREATE TABLE sys_log (
   NEWid varchar(20) DEFAULT '' NOT NULL,
   PRIMARY KEY (uid),
   KEY event (userid,event_pid),
-  KEY recuidIdx (recuid,uid)
+  KEY recuidIdx (recuid,uid),
+  KEY user_auth (type,action,tstamp)