Select COUNT (*) from T1;
+----------+
| COUNT (*) |
+----------+
| 5 |
+----------+
SELECT table_name,
data_length/1024/1024 as ' data_length (MB) ',
index_length/1024/1024 as ' index_length (MB) ',
(Data_length + index_length)/1024/1024 as ' Total (MB) '
From Information_schema.tables
WHERE table_schema= ' Test '
and table_name = ' T1 ';
+------------+-----------------+------------------+------------+
| table_name | Data_length (MB) | Index_length (MB) | Total (MB) |
+------------+-----------------+------------------+------------+
| T1 0.01562500 | 0.00000000 | 0.01562500 |
+------------+-----------------+------------------+------------+
It can be seen from the above that the size of the data on the disk is 12G, and the actual size is 0.01562500MB (estimate), in the case of the use of logical migration is no better.
Prevent false large tables from appearing.
This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1906244
View the actual size and space of the MySQL data table