[TASK] Sane index length for "uid_foreign_tablefield" 43/39443/4
authorMarkus Klein <markus.klein@typo3.org>
Mon, 11 May 2015 14:20:58 +0000 (16:20 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Mon, 11 May 2015 16:55:27 +0000 (18:55 +0200)
The index lengths for the fields "tablenames" and "fieldname"
of table "sys_category_record_mm" are way too big.
It suffices to have only few significant characters in the index.

We only take the first 40 characters of the tablename and the first
three characters of the fieldname as those should already be
distinctive enough to have a high quality index.
Assuming most table names are below 40 characters anyway and usually
only a few fields per table will be a category.

Resolves: #66773
Releases: master
Change-Id: Ib1f077c93425992c557fbc4457699d867521a3ba
Reviewed-on: http://review.typo3.org/39443
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/ext_tables.sql

index 4876a2c..05baa4c 100644 (file)
@@ -689,5 +689,5 @@ CREATE TABLE sys_category_record_mm (
        sorting_foreign int(11) DEFAULT '0' NOT NULL,
 
        KEY uid_local_foreign (uid_local,uid_foreign),
-       KEY uid_foreign_tablefield (uid_foreign,tablenames,fieldname,sorting_foreign)
+       KEY uid_foreign_tablefield (uid_foreign,tablenames(40),fieldname(3),sorting_foreign)
 );