Welcome to WebmasterWorld Guest from 54.226.55.151

Forum Moderators: open

Message Too Old, No Replies

MySQL: order of ENUM values relevance

     
8:12 am on Apr 14, 2017 (gmt 0)

Preferred Member

Top Contributors Of The Month

joined:Mar 15, 2013
posts: 573
votes: 47


I can't seem to find the answer to what I think is a fairly simple and common question, so I'm hoping you guys can advise.

Let's say that I have
ENUM('book', 'home', 'recipe', 'sports', 'tech',...)

But in reality, "sports" is the most common category to be returned, by a long shot.

Is there any value in placing "sports" at the beginning of the value list, rather than further down? Meaning, would MySQL start to query the index, find "sports" in the 1 location, and then stop? Or does it really not matter at all?