Index Selectivity & Cardinality
Learn Index Selectivity & Cardinality (Indexes, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction Cardinality is the estimated number of distinct values in an index. Selectivity = distinct values / total rows (0 to 1). High selectivity (near 1, like email) means an index narrows to few rows; low selectivity (like gender) does not.