[TASK] Add index to sys_category 75/26775/3
authorIngo Schmitt <is@marketing-factory.de>
Mon, 13 Jan 2014 09:28:37 +0000 (10:28 +0100)
committerBenjamin Mack <benni@typo3.org>
Mon, 13 Jan 2014 13:27:38 +0000 (14:27 +0100)
All page, content and file-records TCEforms render a category
tree in order to assign these. The tree building executes the
same queries quite often. In order to optimize these queries
this change adds
* an index "category_parent" to sys_category.parent in order
  to for the parent category while index "parent" currently
  indexes the pid the record is stored.

* a combined index "category_list" to columns pid, deleted
  and sys_language_uid.

Resolves: #54929
Releases: 6.2
Change-Id: I1d42ba7171dc1213d5d5559ae190092acaa57464
Reviewed-on: https://review.typo3.org/26775
Reviewed-by: Oliver Klee
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/core/ext_tables.sql

index 5527e29..f376f4c 100644 (file)
@@ -680,7 +680,9 @@ CREATE TABLE sys_category (
 
        PRIMARY KEY (uid),
        KEY parent (pid),
-       KEY t3ver_oid (t3ver_oid,t3ver_wsid)
+       KEY t3ver_oid (t3ver_oid,t3ver_wsid),
+       KEY category_parent (parent),
+       KEY category_list (pid,deleted,sys_language_uid),
 );
 
 #