1、進(jìn)去指定schema

創(chuàng)新互聯(lián)從2013年開(kāi)始,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)、網(wǎng)站制作網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元江陰做網(wǎng)站,已為上家服務(wù),為江陰各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792
數(shù)據(jù)庫(kù)(存放了其他的數(shù)據(jù)庫(kù)的信息)
use
information_schema
2、查詢所有數(shù)據(jù)的大小
select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB')
as
data
from
TABLES
3、查看指定數(shù)據(jù)庫(kù)的大小
比如說(shuō)
數(shù)據(jù)庫(kù)apoyl
select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB')
as
data
from
TABLES
where
table_schema='apoyl';
4、查看指定數(shù)據(jù)庫(kù)的表的大小
比如說(shuō)
數(shù)據(jù)庫(kù)apoyl
中apoyl_test表
select
concat(round(sum(DATA_LENGTH/1024/1024),2),'MB')
as
data
from
TABLES
where
table_schema='apoyl'
and
table_name='apoyl_test';
整完了,有興趣的可以試哈哦!挺使用哈
1、查詢整個(gè)mysql數(shù)據(jù)庫(kù),整個(gè)庫(kù)的大小;單位轉(zhuǎn)換為MB。
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data? from information_schema.TABLES
2、查詢mysql數(shù)據(jù)庫(kù),某個(gè)庫(kù)的大小;
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data
from information_schema.TABLES
where table_schema = 'testdb'
3、查看庫(kù)中某個(gè)表的大小;
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庫(kù)中,test開(kāi)頭的表,所有存儲(chǔ)大小;
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、進(jìn)去指定schema 數(shù)據(jù)庫(kù)(存放了其他的數(shù)據(jù)庫(kù)的信息)\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ù)庫(kù)的大小\x0d\x0a比如說(shuō) 數(shù)據(jù)庫(kù)apoyl\x0d\x0aselect concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='apoyl';\x0d\x0a4、查看指定數(shù)據(jù)庫(kù)的表的大小\x0d\x0a比如說(shuō) 數(shù)據(jù)庫(kù)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)站找的,都是正解
你好,要想知道每個(gè)數(shù)據(jù)庫(kù)的大小的話,步驟如下:
1、進(jìn)入information_schema 數(shù)據(jù)庫(kù)(存放了其他的數(shù)據(jù)庫(kù)的信息)
use information_schema;
2、查詢所有數(shù)據(jù)的大小:
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;
3、查看指定數(shù)據(jù)庫(kù)的大小:
比如查看數(shù)據(jù)庫(kù)home的大小
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='home';
4、查看指定數(shù)據(jù)庫(kù)的某個(gè)表的大小
比如查看數(shù)據(jù)庫(kù)home中 members 表的大小
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='home' and table_name='members';
文章標(biāo)題:怎么查看mysql大小,mysql如何查看表的大小
當(dāng)前路徑:http://chinadenli.net/article40/hsgcho.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、響應(yīng)式網(wǎng)站、網(wǎng)站導(dǎo)航、網(wǎng)頁(yè)設(shè)計(jì)公司、定制開(kāi)發(fā)、標(biāo)簽優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)