# 查询数据库中每个库的数据量 SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; # 查询数据库中每个库的表数据量 SELECT TABLE_SCHEMA, COUNT(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
标签:GROUP,mysql,查询,数据量,查询数据库,table,schema From: https://www.cnblogs.com/databank/p/17831231.html