1、查詢整個mysql數(shù)據(jù)庫,整個庫的大小;單位轉(zhuǎn)換為MB。

成都創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比羅平網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式羅平網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋羅平地區(qū)。費用合理售后完善,10余年實體公司更值得信賴。
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data? from information_schema.TABLES
2、查詢mysql數(shù)據(jù)庫,某個庫的大小;
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data
from information_schema.TABLES
where table_schema = 'testdb'
3、查看庫中某個表的大小;
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data
from information_schema.TABLES
where table_schema = 'testdb'
and table_name = 'test_a';
4、查看mysql庫中,test開頭的表,所有存儲大小;
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data
from information_schema.TABLES
where table_schema = 'testdb'
and table_name like 'test%';
1、進去指定schema 數(shù)據(jù)庫(存放了其他的數(shù)據(jù)庫的信息)\x0d\x0ause information_schema\x0d\x0a2、查詢所有數(shù)據(jù)的大小\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES\x0d\x0a3、查看指定數(shù)據(jù)庫的大小\x0d\x0a比如說 數(shù)據(jù)庫apoyl\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl';\x0d\x0a4、查看指定數(shù)據(jù)庫的表的大小\x0d\x0a比如說 數(shù)據(jù)庫apoyl 中apoyl_test表\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl' and table_name='apoyl_test';\x0d\x0a整完了,有興趣的可以試哈哦!挺使用哈\x0d\x0a網(wǎng)站找的,都是正解
在mysql的information_schema下有存儲數(shù)據(jù)庫基本信息的數(shù)據(jù)字典表,可以通過查詢tables表來獲得所需要的表相關(guān)信息。
名稱欄目:c語言怎么區(qū)分主函數(shù),c語言主函數(shù)是什么
分享路徑:http://chinadenli.net/article41/dsgdied.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)、動態(tài)網(wǎng)站、域名注冊、云服務(wù)器、微信小程序、關(guān)鍵詞優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)