Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat does a Cardinality of 0 indicate in this mySQL table and index?
    primarykey
    data
    text
    <p>I am trying to learn mySQL database, and have started taking a look at the database behind wordpress. I am using the <a href="http://codex.wordpress.org/Database_Description" rel="nofollow noreferrer">Wordpress Data Base Descrition</a> to review the structure and I came upon the following:</p> <pre><code>|Table: wp_commentmeta| --------------------------------------------------------------------------------- |Field |Type |Null |Key |Default | Extra |-----------|--------------------|------|----|--------|-------------------------- |meta_id |bigint(20) unsigned | |PRI |NULL |auto_increment |comment_id |bigint(20) unsigned | |IND |0 |FK-&gt;wp_comments.comment_id |meta_key |varchar(255) |YES |IND |NULL | |meta_value |longtext |YES | |NULL | |Indexes| --------------------------------------------------------- |Keyname |Type |Cardinality |Field |------------|---------|------------|-------------------- |PRIMARY |PRIMARY |0 |meta_ID |comment_id |INDEX |none |comment_id |meta_key |INDEX |none |meta_key </code></pre> <p>My question is, <em>what does a Cardinality value of 0 indicate in the table above</em>. I understand the explanation of cardinality as explained in <a href="https://stackoverflow.com/questions/755569/why-does-the-cardinality-of-an-index-in-mysql-remain-unchanged-when-i-add-a-new/755599#755599">this SO answer</a> in that it is the number of unique values within a particular set of indexed values, but I dont get what setting a value of 0 does in this particular case.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload