LoginSignup
0
0

More than 5 years have passed since last update.

【SQL】データベースのサイズを確認

Posted at

MysqlでGB単位、Mb単位の両方を表示するSQL文

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

実行結果例

db_name GB MB
information_schema 0.000009536743 0.00976563
mysql 0.000991821289 1.01562500
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0