Hi,
I`ve read that columns that are chosen for indices should discrimate well among the rows, i.e. index columns should not contain a large number of rows with the same value. This would suggest that booleans or an enum such as gender would be a bad choice for an index.
But say I want to find users by gender and in my particular database, only 2% of the users are female, then in that case it seems like the gender column would be a useful index when getting the female users, but not when getting all the male users. So would it generally be a good idea to put an index on such a column?
Thanks, Don