mysql 统计所有表的数据量

发布时间 2023-11-21 10:13:05作者: 一看就懂

在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