From my understanding you don't gain much by setting an index in a column that will hold few distinct values.
I have a column that holds a boolean value (actually it's a small int, but I'm using it as a flag), and this column is used in the WHERE
clauses of most of the queries I have.
In a theoretical "average" case, half of the records' values will be 1 and the other half, 0.
So, in this scenario, the database engine could avoid a full table scan, but will have to read a lot of rows anyway (total rows/2).
So, should I make this column an index?
I'm using Mysql 5, but I'm more interested in a general rationale on why it does / does not make sense indexing a column that I know that will have a low cardinality.