搜索

一文看懂MySQL如何查看数据库表容量大小

发表于 2025-11-05 01:17:33 来源:全栈开发
一文看懂MySQL如何查看数据库表容量大小
复制SELECT      table_schema AS 数据库,何查      sum( table_rows ) AS 记录数,      sum( TRUNCATE ( data_length / 1024 / 1024, 2 ) ) AS 数据容量(MB),      sum( TRUNCATE ( index_length / 1024 / 1024, 2 ) ) AS 索引容量(MB)   FROM      information_schema.TABLES   GROUP BY      table_schema   ORDER BY      sum( data_length ) DESC,      sum( index_length ) DESC;  1.2.3.4.5.6.7.8.9.10.11.12.
随机为您推荐
版权声明:本站资源均来自互联网,如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

Copyright © 2016 Powered by 一文看懂MySQL如何查看数据库表容量大小,全栈开发  滇ICP备2023006006号-32sitemap

回顶部