/* 指定的数据库 每个表的索引  不包含主键索引的大小*/
select TABLE_NAME, concat(truncate(data_length/1024/1024,2),'mb') as data_size,  concat(truncate(index_length/1024/1024,2),'mb') as index_size  
from information_schema.tables
where TABLE_SCHEMA = '你的数据库名'
group by TABLE_NAME
order by data_length desc

 

相关文章:

  • 2021-10-15
  • 2020-06-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2021-07-28
  • 2021-11-13
猜你喜欢
  • 2021-07-26
  • 2021-11-07
  • 2022-12-23
  • 2021-12-09
  • 2021-06-19
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案