婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > MySQL查看數(shù)據(jù)庫表容量大小的方法示例

MySQL查看數(shù)據(jù)庫表容量大小的方法示例

熱門標簽:悟空科技電話機器人 騰訊地圖標注提升 銅陵防封電銷卡 福建外呼系統(tǒng)定制化 400電話可以免費申請嗎 電銷卡外呼系統(tǒng)供應商 美國反騷擾電話機器人 真人語音電話機器人 怎么在地圖標注位置生成圖片

本文介紹MySQL查看數(shù)據(jù)庫表容量大小的命令語句,提供完整查詢語句及實例,方便大家學習使用。

1.查看所有數(shù)據(jù)庫容量大小

select 
table_schema as '數(shù)據(jù)庫',
sum(table_rows) as '記錄數(shù)',
sum(truncate(data_length/1024/1024, 2)) as '數(shù)據(jù)容量(MB)',
sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'
from information_schema.tables
group by table_schema
order by sum(data_length) desc, sum(index_length) desc;

2.查看所有數(shù)據(jù)庫各表容量大小

select 
table_schema as '數(shù)據(jù)庫',
table_name as '表名',
table_rows as '記錄數(shù)',
truncate(data_length/1024/1024, 2) as '數(shù)據(jù)容量(MB)',
truncate(index_length/1024/1024, 2) as '索引容量(MB)'
from information_schema.tables
order by data_length desc, index_length desc;

3.查看指定數(shù)據(jù)庫容量大小

例:查看mysql庫容量大小

select 
table_schema as '數(shù)據(jù)庫',
sum(table_rows) as '記錄數(shù)',
sum(truncate(data_length/1024/1024, 2)) as '數(shù)據(jù)容量(MB)',
sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'
from information_schema.tables
where table_schema='mysql';

 

4.查看指定數(shù)據(jù)庫各表容量大小

例:查看mysql庫各表容量大小

select 
table_schema as '數(shù)據(jù)庫',
table_name as '表名',
table_rows as '記錄數(shù)',
truncate(data_length/1024/1024, 2) as '數(shù)據(jù)容量(MB)',
truncate(index_length/1024/1024, 2) as '索引容量(MB)'
from information_schema.tables
where table_schema='mysql'
order by data_length desc, index_length desc;

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

您可能感興趣的文章:
  • Mysql數(shù)據(jù)庫清理binlog日志命令詳解
  • MySQL 數(shù)據(jù)庫鐵律(小結)
  • mysql如何比對兩個數(shù)據(jù)庫表結構的方法
  • 利用MySQL系統(tǒng)數(shù)據(jù)庫做性能負載診斷的方法
  • mysql創(chuàng)建數(shù)據(jù)庫,添加用戶,用戶授權實操方法

標簽:聊城 云浮 臨汾 湖南 烏海 白銀 湖北 武威

巨人網(wǎng)絡通訊聲明:本文標題《MySQL查看數(shù)據(jù)庫表容量大小的方法示例》,本文關鍵詞  MySQL,查看,數(shù)據(jù)庫,表,容量大,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《MySQL查看數(shù)據(jù)庫表容量大小的方法示例》相關的同類信息!
  • 本頁收集關于MySQL查看數(shù)據(jù)庫表容量大小的方法示例的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 旌德县| 桐柏县| 北海市| 杭锦旗| 兴城市| 江油市| 望江县| 灌云县| 玉林市| 隆尧县| 衡阳县| 清河县| 佛坪县| 南和县| 北辰区| 大方县| 新龙县| 晋宁县| 高清| 临颍县| 嵊州市| 澄城县| 龙南县| 宣武区| 瓦房店市| 凌云县| 顺义区| 吉首市| 潞城市| 堆龙德庆县| 土默特左旗| 安阳市| 东港市| 齐齐哈尔市| 灵山县| 乌审旗| 田林县| 资源县| 宜兰市| 京山县| 通江县|