Cardinality
The number of distinct values in a column or result set, critical for query optimization.
If a column has low cardinality (few unique values, like a gender column with {M, F, X}), an index on it is less useful than on a high-cardinality column like customer ID. Query optimizers use cardinality estimates to decide between table scans, index scans, and join orders. Wrong estimates lead to bad query plans. The difference between a good estimate and a bad one can mean the difference between a query running in milliseconds or timing out.
Modern databases automatically collect and maintain statistics on cardinality for every column and combinations of columns, updating them during vacuum or after large data changes.