Index
Create Index
CREATE [UNIQUE] INDEX idx_name
[USING {HASH | BTREE}]
ON tbl_name (col_name,...)
Drop Index
DROP INDEX idx_name ON tbl_name
Show Index
SHOW {INDEX | INDEXES | KEYS} [FROM tbl_name] [WHERE expr]
XDB> show INDEXES ;
+---------+---------+------+----------+
| table | idx_key | type | col_list |
+---------+---------+------+----------+
| student | PRIMARY | HASH | id |
| student | name_2 | HASH | name |
| teacher | PRIMARY | HASH | id |
| teacher | name_2 | HASH | name |
| book | PRIMARY | HASH | id |
| book | name_2 | HASH | name |
+---------+---------+------+----------+
6 rows in set (0.016 ms)