ユーザ用ツール

サイト用ツール


サイドバー

Action disabled: revisions
database:mariadb:容量チェック

データベースの容量

各データベースでどのくらいの容量があるか知りたい場合のコマンド

Byteで算出する場合

select table_schema, sum(data_length+index_length) as B from information_schema.tables  group by table_schema order by sum(data_length+index_length) desc;

MegaByteで算出したい場合は1024で2回割ってやればOK

select table_schema, sum(data_length+index_length) /1024 /1024 as MB from information_schema.tables  group by table_schema order by sum(data_length+index_length) desc;

DBの容量でQuotaを掛けたい場合はこの値で計算すれば良いんじゃないかと思うが、そこまで巨大なデータベースを扱う事なんてないだろうなぁwww

database/mariadb/容量チェック.txt · 最終更新: 2019/01/07 06:18 by MIYAKO