全部博文(99)
分类: Mysql/postgreSQL
2012-04-12 11:16:56
点击(此处)折叠或打开
mysql> show index from tb;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| tb | 1 | idx_id | 1 | id | NULL | 5 | NULL | NULL | YES | HASH | | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1 row in set (0.00 sec)
9094133352012-04-12 14:22:17
mysql> create index idx_id_1 on tb(id) using BTREE
-> ;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 7
Current database: test
Query OK, 10 rows affected (0.02 sec)
Records: 10 Duplicates: 0 Warnings: 0
mysql> show index from tb;
+-------+------------+----------+--------------+-------------+-----------+---