I'm doing some benchmarks and I found a strange thing - real table size is in 7 times bigger than estimated size
I created a table with 1 int column (4 bytes)
CREATE TABLE `t_int` (
`c_int` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
And inserted 57M records with value 1
. I expected to get table 228Mb (4 bytes * 57M records), but got 1.8Gb
Name: t_int
Engine: InnoDB
Version: 10
Row_format: Dynamic
Rows: 57391085
Avg_row_length: 36
Data_length: 2089795584
Max_data_length: 0
Index_length: 0
Data_free: 5242880
Auto_increment: NULL
Create_time: 2017-01-12 22:42:23
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
optimize tables
has not changed the results
Why is that?
MySQL 5.7.11
show table status;
, I don't have access to real db file as I use AWS RDS