View MySQL indexes and mysql Indexes
Mysql> show index from tblname; mysql> show keys from tblname; · Table name. · Non_unique: 0 if the index cannot contain duplicate words. If yes, it is 1. · Key_name index name. · Column serial number in Seq_in_index, starting from 1. · Column_name column name. · How the Collation column is stored in the index. In MySQL, there are values 'A' (ascending) or NULL (unclassified ). · Number of unique values in the Cardinality index. You can update analyze table or myisamchk-a by running analyze table. The base number is counted based on the statistical data stored as an integer. Therefore, this value is not required to be accurate even for small tables. The larger the base, the larger the number of machines that MySQL uses the index when performing the union operation. · Sub_part: If a column is partially indexed, it is the number of indexed characters. If the entire column is indexed, the value is NULL. · Packed indicates how the keywords are compressed. If it is not compressed, It is NULL. · Null: If the column contains NULL, YES is contained. If NO, the column contains NO. · Index_type used index methods (BTREE, FULLTEXT, HASH, RTREE ). · Comment