Project

General

Profile

Actions

Task #82671

closed

Remove duplicate database indexes

Added by Alexander Grein over 6 years ago. Updated over 5 years ago.

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:

  1. ########################################################################
  2. typo3.index_words
  3. ########################################################################
  1. Key metaphone ends with a prefix of the clustered index
  2. Key definitions:
  3. KEY `metaphone` (`metaphone`,`wid`)
  4. PRIMARY KEY (`wid`),
  5. Column types:
  6. `metaphone` int(11) not null default '0'
  7. `wid` int(11) not null default '0'
  8. To shorten this duplicate clustered index, execute:
    ALTER TABLE `typo3`.`index_words` DROP INDEX `metaphone`, ADD INDEX `metaphone` (`metaphone`);
  1. Key baseword ends with a prefix of the clustered index
  2. Key definitions:
  3. KEY `baseword` (`baseword`,`wid`),
  4. PRIMARY KEY (`wid`),
  5. Column types:
  6. `baseword` varchar(60) not null default ''
  7. `wid` int(11) not null default '0'
  8. To shorten this duplicate clustered index, execute:
    ALTER TABLE `typo3`.`index_words` DROP INDEX `baseword`, ADD INDEX `baseword` (`baseword`);
  1. ########################################################################
  2. typo3.sys_category
  3. ########################################################################
  1. parent is a left-prefix of category_list
  2. Key definitions:
  3. KEY `parent` (`pid`),
  4. KEY `category_list` (`pid`,`deleted`,`sys_language_uid`)
  5. Column types:
  6. `pid` int(11) not null default '0'
  7. `deleted` smallint(6) not null default '0'
  8. `sys_language_uid` int(11) not null default '0'
  9. To remove this duplicate index, execute:
    ALTER TABLE `typo3`.`sys_category` DROP INDEX `parent`;
  1. ########################################################################
  2. typo3.sys_domain
  3. ########################################################################
  1. parent is a left-prefix of getDomainStartPage
  2. Key definitions:
  3. KEY `parent` (`pid`),
  4. KEY `getDomainStartPage` (`pid`,`hidden`,`domainName`)
  5. Column types:
  6. `pid` int(11) unsigned not null default '0'
  7. `hidden` smallint(5) unsigned not null default '0'
  8. `domainname` varchar(80) not null default ''
  9. To remove this duplicate index, execute:
    ALTER TABLE `typo3`.`sys_domain` DROP INDEX `parent`;
  1. ########################################################################
  2. typo3.sys_log
  3. ########################################################################
  1. Key recuidIdx ends with a prefix of the clustered index
  2. Key definitions:
  3. KEY `recuidIdx` (`recuid`,`uid`),
  4. PRIMARY KEY (`uid`),
  5. Column types:
  6. `recuid` int(11) unsigned not null default '0'
  7. `uid` int(11) unsigned not null auto_increment
  8. 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 #1

Updated by Alexander Grein over 6 years ago

The definition for indexed_search can be found in:
typo3/sysext/indexed_search/ext_tables.sql

The definition of sys_domain can be found in:
typo3/sysext/frontend/ext_tables.sql

Actions #3

Updated by Georg Ringer over 6 years ago

do you wanna send a patch to gerrit?

Actions #4

Updated by Alexander Grein over 6 years ago

no plan anymore how this works.

Actions #5

Updated by Sybille Peters about 6 years ago

Thank you for your report.

Even though it has been some time, would you consider submitting a new patch to our Gerrit review server?

You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel. You can register in the TYPO3 slack workspace here: https://forger.typo3.com/slack

Also, if your issue is no longer reproducable, please let us know in the slack channel, so that this issue can be closed.

Thank you in advance!

Sybille

Actions #6

Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56856

Actions #7

Updated by Gerrit Code Review almost 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56856

Actions #8

Updated by Gerrit Code Review almost 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56911

Actions #9

Updated by Stefan Froemken almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF