可以通过以下 SQL 语句来统计 MySQL 表的数据库使用内存:
SELECT table_schema "Database Name", SUM(data_length + index_length) / 1024 / 1024 "Database Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
这条 SQL 语句会返回每个数据库的名称和它们所占用的内存大小(以 MB 为单位)。
可以通过以下 SQL 语句来统计 MySQL 表的数据库使用内存:
SELECT table_schema "Database Name", SUM(data_length + index_length) / 1024 / 1024 "Database Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
这条 SQL 语句会返回每个数据库的名称和它们所占用的内存大小(以 MB 为单位)。