mysql -h192.168.0.150 -uroot -p
新建索引:
create index indexName on table(columnName)
显示建表语句:
SHOW CREATE TABLE table_name
mysql 索引花费时间:
mysql> select count(*) from dac_traffic_channel_day_201202;
+----------+
| count(*) |
+----------+
| 1378899 |
+----------+
1 row in set (12.11 sec)
mysql> create index index_id on dac_traffic_channel_day_201202(id);
Query OK, 0 rows affected (22.07 sec)
Records: 0 Duplicates: 0 Warnings: 0