What information does mysql table index have? The following describes how to view mysql table indexes and how to classify mysql table indexes for your reference.
Mysql> show index from tblname;
Mysql> show keys from tblname;
· Table
Table name.
· Non_unique
If the mysql table index cannot contain duplicate words, the value is 0. If yes, it is 1.
· Key_name
The name of the index.
· Seq_in_index
The column serial number in the index, starting from 1.
· Column_name
Column name.
· Collation
How the column is stored in the index. In MySQL, values 'a' are in ascending order) or NULL is not classified ).
· Cardinality
The estimated number of unique values in the 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 keywords are compressed. If it is not compressed, It is NULL.
· Null
If the column contains NULL, YES is included. If NO, the column contains NO.
· Index_type
Used Index Methods: BTREE, FULLTEXT, HASH, RTREE ).
· Comment
More comments.
Create a temporary table in php mysql
Quick table creation in mysql
In-depth study on MySQL's data deletion from multiple tables
Simple MySQL large table backup method
MySQL table management commands