MySQL Forums
Forum List  »  General

Re: Using an ENUM column in an index
Posted by: Tom Byars
Date: March 18, 2015 01:46AM

Peter Brawley Wrote:
-------------------------------------------------------
> That's index selectivity = 0.0001, operationally
> indistinguishable from zero. MySQL tends to ignore
> indexes with selectivity < 0.3. Before putting
> such an index into production, I'd want to prove
> that it actually makes a positive performance
> diff.

Not sure what you mean by this Peter. Are you saying MySQL ignores the enum field and searches through all records matching the index columns that come before the enum field. e.g. Suppose I have a Tbl with primary key (Col1,Col2,Col3) and Col3 is an autoinc tinyint column to make ties on Col1,Col2 unique. What would happen there?

Options: ReplyQuote


Subject
Written By
Posted
Re: Using an ENUM column in an index
March 18, 2015 01:46AM


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.