index's of cols col's

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

index's of cols col's

Post by pelegk2 »

i have index some col's using the phpmyadmin
and in the table with the list of the index col's 1 of the col's name is
"Cardinality" - what does this mean?
and what dooes it mean that Cardinality is null?
thnaks in advance
peleg
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

Cardinality the number of discrete items in the table. High Cardinality means that there are few items(like gender, or a boolean field) and the index will be less useful, as its has far more matches to sort thru. Indeces on this type of data will likely not get used as it would return up to 50% of the rows. Low Cardinality is the opposite, having lots of discrete values and makes matching easier using the index, (like autonumbers, SSNs)

Null, I think would indicate that there are no repeated values
Post Reply