MySQL Forums
Forum List  »  General

Re: Index speed - a couple of questions
Posted by: James Day
Date: February 01, 2005 05:14PM

What you heard in 1 is correct. Your where needs to include the leading key parts or the trailing key parts in the index won't be used. Prior ot version 5 MySQL wouldn't use more than one key per table name/alias in each select statement, so combined keys would be necessary. See http://dev.mysql.com/doc/mysql/en/index-merge-optimization.html for an enhancement in version 5.

If you're indexing individual words within a text column you'd probably want to use a fulltext index. A like clause with %someword% requires a full table scan if you don't use a fulltext index. Whether you use fulltext or normal index depends on what you're doing.

Options: ReplyQuote


Subject
Written By
Posted
Re: Index speed - a couple of questions
February 01, 2005 05:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.