一:查询所有数据的大小
mysql> select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES;
+------------+
| data           |
+------------+
| 43581.77MB |
+------------+
1 row in set, 1 warning (9.84 sec)

二:查看指定数据库的大小
mysql> select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES where table_schema='wo';
+------------+
| data           |
+------------+
| 20833.77MB |
+------------+
1 row in set (0.00 sec)

三:查看数据库表的大小 wodfan库spider_sku表
mysql>  select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data,concat(round(sum(index_length/1024/1024),2),'MB') as index_mb from TABLES where table_schema='wo' and table_name='spider';
+-----------+----------+
| data      | index_mb |
+-----------+----------+
| 4413.00MB | 824.75MB |
+-----------+----------+
1 row in set (0.00 sec)

相关文章:

  • 2021-12-31
  • 2021-12-31
  • 2021-05-11
  • 2021-09-27
  • 2021-08-05
  • 2021-11-03
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2021-09-13
  • 2021-11-29
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案