Mysql 查询数据库数据量
原创
©著作权归作者所有:来自51CTO博客作者六月的雨在51CTO的原创作品,请联系作者获取转载授权,否则将追究法律责任
Mysql查询数据库数据量
SELECT
table_name AS '表名',
table_rows AS '记录数',
TRUNCATE (data_length / 1024 / 1024, 2) AS '数据容量(MB)',
TRUNCATE (index_length / 1024 / 1024, 2) AS '索引容量(MB)'
FROM
information_schema. TABLES
WHERE
table_schema = 'ei_qs_study'
ORDER BY
table_rows DESC;