Actions
Task #82671
closedRemove duplicate database indexes
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2017-10-04
Due date:
% Done:
100%
Estimated time:
1.00 h
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Sprint Focus:
Description
Checking a typical typo3 8.7 database, using the percona toolskit (https://www.percona.com/software/database-tools/percona-toolkit) command "pt-duplicate-key-checker", gives me the following result:
- ########################################################################
- typo3.index_words
- ########################################################################
- Key metaphone ends with a prefix of the clustered index
- Key definitions:
- KEY `metaphone` (`metaphone`,`wid`)
- PRIMARY KEY (`wid`),
- Column types:
- `metaphone` int(11) not null default '0'
- `wid` int(11) not null default '0'
- To shorten this duplicate clustered index, execute:
ALTER TABLE `typo3`.`index_words` DROP INDEX `metaphone`, ADD INDEX `metaphone` (`metaphone`);
- Key baseword ends with a prefix of the clustered index
- Key definitions:
- KEY `baseword` (`baseword`,`wid`),
- PRIMARY KEY (`wid`),
- Column types:
- `baseword` varchar(60) not null default ''
- `wid` int(11) not null default '0'
- To shorten this duplicate clustered index, execute:
ALTER TABLE `typo3`.`index_words` DROP INDEX `baseword`, ADD INDEX `baseword` (`baseword`);
- ########################################################################
- typo3.sys_category
- ########################################################################
- parent is a left-prefix of category_list
- Key definitions:
- KEY `parent` (`pid`),
- KEY `category_list` (`pid`,`deleted`,`sys_language_uid`)
- Column types:
- `pid` int(11) not null default '0'
- `deleted` smallint(6) not null default '0'
- `sys_language_uid` int(11) not null default '0'
- To remove this duplicate index, execute:
ALTER TABLE `typo3`.`sys_category` DROP INDEX `parent`;
- ########################################################################
- typo3.sys_domain
- ########################################################################
- parent is a left-prefix of getDomainStartPage
- Key definitions:
- KEY `parent` (`pid`),
- KEY `getDomainStartPage` (`pid`,`hidden`,`domainName`)
- Column types:
- `pid` int(11) unsigned not null default '0'
- `hidden` smallint(5) unsigned not null default '0'
- `domainname` varchar(80) not null default ''
- To remove this duplicate index, execute:
ALTER TABLE `typo3`.`sys_domain` DROP INDEX `parent`;
- ########################################################################
- typo3.sys_log
- ########################################################################
- Key recuidIdx ends with a prefix of the clustered index
- Key definitions:
- KEY `recuidIdx` (`recuid`,`uid`),
- PRIMARY KEY (`uid`),
- Column types:
- `recuid` int(11) unsigned not null default '0'
- `uid` int(11) unsigned not null auto_increment
- To shorten this duplicate clustered index, execute:
ALTER TABLE `typo3`.`sys_log` DROP INDEX `recuidIdx`, ADD INDEX `recuidIdx` (`recuid`);
In order to save some disc space and make the world a little bit better, please remove this five duplicate database indexes.
All definition can be found in typo3/sysext/core/ext_tables.sql
Files
Actions