mysql> use
information_schema;
Database changed
#查看整个所有库大小:
mysql> select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES;
+-----------+
| data |
+-----------+
| 1368.64MB |
+-----------+
1 row in set (10.34 sec)
#查看单个库大小:
mysql> select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='c2c2012';
+----------+
| data |
+----------+
|
760.67MB |
+----------+
1 row in set (0.32 sec)
#查看单个表大小:
mysql> select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='c2c2012' and
table_name='c2c_cpm_earn_total_log';
+----------+
|
data |
+----------+
| 447.95MB |
+----------+
1 row in set (0.19
sec)
没有评论:
发表评论