三个表分别导入1千万数据后对三个表进行大小统计,测试结果如下:
Innodb:
mysql> select concat(truncate(sum(data_length)/1024/1024,2),’MB’) as data_size,
-> concat(truncate(sum(max_data_length)/1024/1024,2),’MB’) as max_data_size,
-> concat(truncate(sum(data_free)/1024/1024,2),’MB’) as data_free,
-> concat(truncate(sum(index_length)/1024/1024,2),’MB’) as index_size
-> from information_schema.tables where TABLE_NAME = ‘gos_so2do_statistic_innodb’;
+———–+—————+———–+————+
| data_size | max_data_size | data_free | index_size |
+———–+—————+———–+————+
| 687.00MB | 0.00MB | 6.00MB | 792.89MB |
+———–+—————+———–+————+
1 row in set (0.49 sec)
Myisam:
mysql> select concat(truncate(sum(data_length)/1024/1024,2),’MB’) as data_size,
-> concat(truncate(sum(max_data_length)/1024/1024,2),’MB’) as max_data_size,
-> concat(truncate(sum(data_free)/1024/1024,2),’MB’) as data_free,
-> concat(truncate(sum(index_length)/1024/1024,2),’MB’) as index_size
-> from information_schema.tables where TABLE_NAME = ‘gos_so2do_statistic_myisam’;
+———–+—————-+———–+————+
| data_size | max_data_size | data_free | index_size |
+———–+—————-+———–+————+
| 510.16MB | 268435455.99MB | 0.00MB | 399.07MB |
+———–+—————-+———–+————+
1 row in set (0.00 sec)
Brighthouse:
mysql> select concat(truncate(sum(data_length)/1024/1024,2),’MB’) as data_size,
-> concat(truncate(sum(max_data_length)/1024/1024,2),’MB’) as max_data_size,
-> concat(truncate(sum(data_free)/1024/1024,2),’MB’) as data_free,
-> concat(truncate(sum(index_length)/1024/1024,2),’MB’) as index_size
-> from information_schema.tables where TABLE_NAME = ‘gos_so2do_statistic_brighthouse’;
+———–+—————+———–+————+
| data_size | max_data_size | data_free | index_size |
+———–+—————+———–+————+
| 22.03MB | 0.00MB | 0.00MB | 0.00MB |
+———–+—————+———–+————+
1 row in set (0.01 sec)