查看mysql库和表的大小(空间)
生活随笔
收集整理的這篇文章主要介紹了
查看mysql库和表的大小(空间)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
use information_schema;
查詢所有數(shù)據(jù)的大小:
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;
查看指定數(shù)據(jù)庫的大小:
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='DATABASENAME';
查看指定數(shù)據(jù)庫的某個(gè)表的大小:
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='DATABASENAME' and table_name='TABLENAME';
轉(zhuǎn)載于:https://blog.51cto.com/linuxtips/1773940
總結(jié)
以上是生活随笔為你收集整理的查看mysql库和表的大小(空间)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NSString/NSMutable字符
- 下一篇: 在选择数据库的路上,我们遇到过哪些坑?(