Jump to content

INDEX on an ENUM column


jimfog

Recommended Posts

I have create a table with an ENUM column with 5 values in it...and I have INDEX it.

 

The question is if it is logical to place an INDEX on a column as the above...do you think it is useless?

 

I think I miss something here.

Link to comment
Share on other sites

If you you need to sort on it, why not?

There is this argument you know:

 

Suppose that we have 50k rows with each value appearing on average 10k times.

An INDEX it seems it cannot help a lot...we are talking here about repeating values(and not distinct) from row to row.

Link to comment
Share on other sites

There's also the argument that a good solution today is better than a perfect solution next week.

 

Sometimes we have to wait to truely understand what we've been told. In the meantime we have to keep the lights on.

Edited by niche
Link to comment
Share on other sites

There's also the argument that a good solution today is better than a perfect solution next week.

And how that relates to this topic?

Can you be more specific?

I would like to hear what do you have to say.

Link to comment
Share on other sites

Indexing an ENUM column may not be ideal, but I wouldn't dwell on it for too long if your able to move your project forward. Progress is frequently more important than best practice IMO.

Edited by niche
Link to comment
Share on other sites

  • 2 weeks later...

thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...