mysql 统计所有表的数据量
在mysql里是可以查询information_schema.tables这张表的,然后获取我们想要的信息:
SELECT table_rows,table_name FROM information_schema.tables
WHERE TABLE_SCHEMA = 'mysql'
and table_name not in ('db','func')
ORDER BY table_rows DESC;
转自:https://zhuanlan.zhihu.com/p/607063072