MySQL Forums
Forum List  »  InnoDB

Re: 5.6 Adding new index, it does not get used
Posted by: Paul Williamson
Date: July 16, 2014 09:13AM

Today I tried to put a limit on the length of the index, given that the field is varchar 255, and the charset for the table is utf-8, I thought maybe it was running into the 767 byte limit somehow (though it is clearly not an issue for the 'name' field).

I recreated the index on only the first 50 chars in the field, and ran analyze table. No errors, but also 0 rows affected. 'Explain' tells me there is still no index being used when I select on the new index.

Am I forgetting something really simple? Am I really the only person to experience this? Again, searches using this index do complete quickly and correctly, but as far as I can see, that could be just because there are not too many rows in the table (less than 18K). Until I see the key reflected in the Explain output, I can't be confident that this would scale with more data.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: 5.6 Adding new index, it does not get used
790
July 16, 2014 09:13AM


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.