0%

MySQL查看表大小

方法一:

在 MySQL 的 data 目录下查看,前提是 my.cnf 中配置了 innodb_file_per_table

方法二:

在 MySQL 查询中执行以下操作:

1
2
select table_name,concat(round(data_length/1000/1000/1000,2),'GB') as data_length_GB
from information_schema.tables ORDER BY data_length_GB;