mysql view index SQL statement:
mysql> show index from tblname; mysql> show keys from tblname;
1.Table
The name of the table.
2.Non_unique
0 if the index cannot contain duplicate words. 1 if it can.
3.Key_name
The name of the index.
4.Seq_in_index
Column sequence number in the index, starting at 1.
5.Column_name
column name.
6.Collation
How the column is stored in the index. In MySQL, there are values 'A' (ascending) or NULL (no sort).
7.Cardinality
An estimate of the number of unique values in the index. Updates can be made by running ANALYZE TABLE or myisamchk -a. Cardinality is counted against statistics stored as integers, so even for small tables the value does not have to be exact. The larger the cardinality, the greater the chance that MySQL will use that index when doing a union.
8.Sub_part
If the column is only partially indexed, the number of characters indexed. NULL if the entire column is indexed.
9.Packed
Indicates how the keyword is compressed. NULL if not compressed.
10.Null
Contains YES if the column contains NULL. If not, the column contains NO.
11.Index_type
Used indexing method (BTREE, FULLTEXT, HASH, RTREE).
12.Comment
Article source: http://www.cnblogs.com/cocos/archive/2011/05/06/2039428.html