1、查询整个mysql数据库,整个库的大小;e79fa5e98193e78988e69d8331333431376638单位转换为MB。

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES

 

2、查询mysql数据库,某个库的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES where table_schema = 'crawl'

2、查询mysql数据库,某个库中某个表的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES where table_schema = 'scrapy' and table_name='test_score'

mysql怎么查看数据库中数据的大小

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-07-31
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2021-09-14
  • 2022-12-23
  • 2021-09-11
  • 2021-11-29
相关资源
相似解决方案