MySQL 指令查詢資料庫使用容量
取得資料庫的使用容量
SELECT table_schema "資料庫名稱",
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
亦可查詢剩餘容量(?)
SELECT table_schema "資料庫名稱",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;
SELECT table_schema "資料庫名稱",
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
亦可查詢剩餘容量(?)
SELECT table_schema "資料庫名稱",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;
留言
張貼留言