MySQL查看表占用空间大小(转)
生活随笔
收集整理的這篇文章主要介紹了
MySQL查看表占用空间大小(转)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
//先進(jìn)去MySQL自帶管理庫(kù):information_schema
//自己的數(shù)據(jù)庫(kù):dbwww58com_kuchecarlib
//自己的表:t_carmodelparamvalue mysql> use information_schema;
Database changed
mysql> select data_length,index_length -> from tables where -> table_schema='dbwww58com_kuchecarlib' -> and table_name = 't_carmodelparamvalue';
+-------------+--------------+
| data_length | index_length |
+-------------+--------------+
| 166379520 | 235782144 |
+-------------+--------------+
1 row in set (0.02 sec) mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data_length_MB, -> concat(round(sum(index_length/1024/1024),2),'MB') as index_length_MB -> from tables where -> table_schema='dbwww58com_kuchecarlib' -> and table_name = 't_carmodelparamvalue';
+----------------+-----------------+
| data_length_MB | index_length_MB |
+----------------+-----------------+
| 158.67MB | 224.86MB |
+----------------+-----------------+
1 row in set (0.03 sec)
?
總結(jié)
以上是生活随笔為你收集整理的MySQL查看表占用空间大小(转)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言开发fastcgi初探(一)
- 下一篇: windows 7/2008系统字体变成