Explore Courses Blog Tutorials Interview Questions
0 votes
in SQL by (6.1k points)

What is cardinality in MySQL? Please describe in simple, non-technical language.

If an index detail of any of the table shows the cardinality of a field say group_id as 11, then what does it actually mean?

1 Answer

0 votes
by (12.7k points)

Max cardinality: All the values are unique

Min cardinality: All the values are the same

Some of the columns are called the high-cardinality columns as they have constraints in place (like unique) preventing you from inserting the same value in each row.

Cardinality is a property which affects the ability to cluster, sort and search the data. It is, hence, an essential measurement for the query planners in databases, it is a heuristic which they can use to pick the best plans.

Are you interested to learn SQL in detail? Sign up for the SQL Training course by Intellipaat.

Related questions

Browse Categories