Add script to calculate db size on mysql and mariadb

This commit is contained in:
Marcel Schwarz 2023-08-15 12:44:30 +02:00
parent 6c247f3875
commit bf7f4e63a4

View 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;