查看mysql库下所有表的大小

select table_name as '表名', (data_length/1024/1024) as '数据容量(MB)', (index_length/1024/1024) as '索引容量(MB)', ((data_length+index_length)/1024/1024) as '数据容量+索引容量容量(MB)', table_rows as '数据行数' from information_schema.TABLES where table_schema = '表名' order by ((data_length+index_length)/1024/1024) desc

  

posted @ 2022-10-26 14:37  花语苑  阅读(37)  评论(0编辑  收藏  举报