Quick Answer
Index cardinality is the number of unique values in an indexed column. High cardinality (unique emails, user IDs) = highly selective = index is very useful. Low cardinality (boolean, status with few values) = not selective = MySQL may skip the index and prefer a full table scan. MySQL uses cardinality estimates to decide whether to use an index. Run ANALYZE TABLE to update cardinality stats.
Answer
Cardinality measures uniqueness of indexed values. High cardinality indexes improve search speed.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.