[TYPO3-core] RFC #3107: Duplicate database index in indexed search
Christian Kuhn
lolli at schwarzbu.ch
Wed Mar 24 18:51:06 CET 2010
Hey,
Martin Kutschker wrote:
> 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. "
Yep, the proposed index removal is not just a dupe. It depends on the
queries which indexes are useful for this table.
Some articles about index decisions, there are more on this site:
http://www.mysqlperformanceblog.com/2009/06/05/a-rule-of-thumb-for-choosing-column-order-in-indexes/
http://www.mysqlperformanceblog.com/2006/08/17/duplicate-indexes-and-redundant-indexes/
Regards
Christian
More information about the TYPO3-team-core
mailing list