MySql统计数据库中每一张表的数据量
-- 统计MySQL指定数据库中有多少张表
SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = '需要统计的数据库名称' GROUP BY table_schema;
-- 统计MySQL指定数据库中表数据量
use information_schema;
select table_name,table_rows from tables where TABLE_SCHEMA = '数据库名称' order by table_rows desc;