[TYPO3-core] RFC #3107: Duplicate database index in indexed search

Martin Kutschker masi-no at spam-typo3.org
Wed Mar 24 16:21:49 CET 2010


Dmitry Dulepov schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: bug, trivial
> 
> Branches: 4.4 (database change)
> 
> BT reference: http://bugs.typo3.org/view.php?id=3107
> 
> Problem: index_section table contains a duplicate index. This causes
> unnecessary updates, increases database size and makes it more difficult
> for MySQL to choose the best index.
> 
> Solution: get rid of the duplicate index.

I don't think this is a dupe. IMHO the field order in an index definition is import.

See http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html:

"If the table has a multiple-column index, any leftmost prefix of the index can be used by the
optimizer to find rows. For example, if you have a three-column index on (col1, col2, col3), you
have indexed search capabilities on (col1), (col1, col2), and (col1, col2, col3).

MySQL cannot use an index if the columns do not form a leftmost prefix of the index. "

Masi


More information about the TYPO3-team-core mailing list