Nobody to explain me that?

From: "mel list_php" <[EMAIL PROTECTED]>
To: mysql@lists.mysql.com
Subject: mysql index cardinality
Date: Fri, 25 Feb 2005 16:47:12 +0000

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?


Thanks for any explanation....

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to