MySQL Forums
Forum List  »  General

Re: Using an ENUM column in an index
Posted by: Rick James
Date: March 17, 2015 10:16PM

An ENUM is stored as a 1-byte or 2-byte number. (1 byte for up to 256 values.) So your 255-element ENUM will take only one more byte in the index if it is NOT NULL.

You may as well make ENUMs "NOT NULL".

Let's see some of your indexes and the SELECTs that 'need' them.

Options: ReplyQuote


Subject
Written By
Posted
Re: Using an ENUM column in an index
March 17, 2015 10:16PM


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.