【DB】查询数据库表所占空间大小SELECT table_schema AS Database, table_name AS Table, round(((data_length index_length) / 1024 / 1024), 2) AS Size in MB FROM information_schema.TABLES WHERE table_schema dbName -- 替换为你的数据库名 ORDER BY (data_length index_length) DESC;
【DB】查询数据库表所占空间大小
【DB】查询数据库表所占空间大小SELECT table_schema AS Database, table_name AS Table, round(((data_length index_length) / 1024 / 1024), 2) AS Size in MB FROM information_schema.TABLES WHERE table_schema dbName -- 替换为你的数据库名 ORDER BY (data_length index_length) DESC;