查看MySQL表占用空间大小
生活随笔
收集整理的這篇文章主要介紹了
查看MySQL表占用空间大小
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
mysql> use information_schema; Database changedmysql> select data_length,index_length -> from tables where -> table_schema='allot' -> and table_name = 'AllotBaseInfo'; +-------------+--------------+ | data_length | index_length | +-------------+--------------+ | 61104190 | 0 | +-------------+--------------+ 1 row in set (0.00 sec)轉換為MB
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='allot' -> and table_name = 'AllotBaseInfo'; +----------------+-----------------+ | data_length_MB | index_length_MB | +----------------+-----------------+ | 58.27MB | 0.00MB | +----------------+-----------------+ 1 row in set (0.55 sec)轉載于:https://my.oschina.net/heartdong/blog/123861
總結
以上是生活随笔為你收集整理的查看MySQL表占用空间大小的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 被 ChatGPT 标记为“有争议公众人
- 下一篇: linux cmake编译源码,linu