MySQL Forums
Forum List  »  General

Re: Using an ENUM column in an index
Posted by: Tom Byars
Date: March 20, 2015 02:24AM

I originally added the ENUM column to the indexes because making them unique seemed to speed the queries up no end. Since reading your comments and then doing some testing and studying a few explains I've discovered MySQL wasn't using the correct indexes for many of the queries. Adding 'use index (MyIndex)' to them has made the non-unique indexes just as fast as the unique indexes with the enum column. Removing raceID from the indexes hasn't slowed the queries down by much although I've a bit more testing to do with this.

I'm now fairly sure where I'm going now. I'd like to thank you both for your comments as not only have I learned a lot but the task in hand has been made a lot simpler for me and will actually make the database smaller in size.

Options: ReplyQuote


Subject
Written By
Posted
Re: Using an ENUM column in an index
March 20, 2015 02:24AM


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.