Add script to calculate db size on mysql and mariadb
This commit is contained in:
parent
6c247f3875
commit
bf7f4e63a4
4
scripts/database/mysql/get-size-of-all-dbs.sql
Normal file
4
scripts/database/mysql/get-size-of-all-dbs.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT table_schema "DB Name",
|
||||
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
|
||||
FROM information_schema.tables
|
||||
GROUP BY table_schema;
|
Loading…
Reference in New Issue
Block a user