统计一下数据库中每个表的大小
select table_name TRUNCATE(data_length / 1024 / 1024 / 1024, 5) + TRUNCATE(index_length / 1024 / 1024 / 1024, 5) '总大小/GB'
from information_schema.TABLES
where 4 > 1
group by table_name
order by 4 DESC;
4 > 1 是说第四列大于1G
order by 4 是说按照第四列排序