MySQLHowtogetthedatabasesizeinMySQL?

编程

MySQL 数据库的大小. 原链接: https://tableplus.com/blog/2018/08/mysql-how-to-get-the-size-of-mysql-database.html

SELECT

    table_schema AS "DB Name",

    ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS "DB Size in MB",

    ROUND(SUM(data_length + index_length) / 1024 / 1024 / 1024, 1) AS "DB Size in GB"

FROM

    information_schema.tables

GROUP BY

    table_schema;

 

 

 

 

 

以上是 MySQLHowtogetthedatabasesizeinMySQL? 的全部内容, 来源链接: utcz.com/z/510516.html

回到顶部