SELECT table_schema as ‘数据库‘,
table_name AS ‘表‘,
round(((data_length) / 1024 / 1024), 2) ‘数据量大小(MB)‘,
round(((index_length) / 1024 / 1024), 2) ‘索引量(MB)‘
FROM information_schema.TABLES
where table_schema = ‘yqn_message‘
ORDER BY (data_length)
DESC;
原文:https://www.cnblogs.com/mojiruo/p/13127008.html