Thursday, 15 August 2013

low mysql index cardinality yet data is diverse

low mysql index cardinality yet data is diverse

so I have a table with index on the column card
When I run
SELECT COUNT(DISTINCT(card)) FROM table
it returns 490 distinct entries
However when I run
SHOW INDEXES FROM s_edge_type_group_join;
It revealls that the cardinality of index card on the column card is only
1. That index only has that column in it
Why is this the case? Why is isn't the cardinality of the index reflect
the diversity of the data?

No comments:

Post a Comment