Hi,
A strange thing with index, I thought the cardinality was automatically
updated (like for a primary key for exemple).
When I use a primary key in a table, insert a row, the cardinality is
increased of 1 as well.
I just tried to do that with an INDEX, and the cardinality is none unless I
update it with analyze table for
example.(http://dev.mysql.com/doc/mysql/en/show-index.html)
I also tried with KEY (which is supposed to be an alias of index) and after
the first insertion it updated the cardinality but not later on.
1/any explanation?is there a kind of random update from time to time?
2/ is that cardinality important to know? I read that big cardinality will
ensure that the index is used for joins for example. Does MySQL check the
"real" cardinality before querying?Or do I have to run an analyze table from
time to time?
3/ a primary key is just a peculiar index, so why is that value updated?
4/ the cardinality is none ?
Thanks for any explanation....