mysql> show table status like 'example_table'\G
*************************** 1. row ***************************
Name: example_table
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 2750508
Avg_row_length: 472
Data_length: 1300304684
Max_data_length: 281474976710655
Index_length: 516225024
Data_free: 0
Auto_increment: 2800006
Create_time: 2008-02-27 10:45:44
Update_time: 2008-07-11 15:41:30
Check_time: 2008-02-27 11:05:27
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
mysql> alter table example_table max_rows=210000000 avg_row_length = 1024;
Query OK, 2750508 rows affected (15 min 28.11 sec)
Records: 2750508 Duplicates: 0 Warnings: 0
mysql> show table status like 'example_table'\G
*************************** 1. row ***************************
Name: example_table
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 2750508
Avg_row_length: 472
Data_length: 1300304536
Max_data_length: 1099511627775
Index_length: 461033472
Data_free: 0
Auto_increment: 2800006
Create_time: 2008-10-17 13:27:33
Update_time: 2008-10-17 13:29:47
Check_time: 2008-10-17 13:42:58
Collation: utf8_general_ci
Checksum: NULL
Create_options: max_rows=210000000 avg_row_length=1024
这个修改可真是消耗时间,有时间还是应该早做处理,早做打算。
当然,在迁移数据的时候,我们应该有可以变通的方法。

没有评论:
发表评论