连接mysql和 建索引花费

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

猜你喜欢

转载自kevin-gmail-com.iteye.com/blog/1396283