diff --git a/HowtoMySQL.md b/HowtoMySQL.md index a4d43ec3..e516c0ba 100644 --- a/HowtoMySQL.md +++ b/HowtoMySQL.md @@ -744,8 +744,18 @@ mysql> 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; + +; Si on préfère avoir le détail entre taille de données et d'index : + +mysql> SELECT table_schema "DB Name", + Round(Sum(data_length) / 1024 / 1024, 1) "Data (in MB)", + Round(Sum(index_length) / 1024 / 1024, 1) "Index (in MB)", + Round(Sum(data_length + index_length) / 1024 / 1024, 1) "Total size in MB" +FROM information_schema.tables +GROUP BY table_schema; ~~~ + Pour lister la taille de toutes les tables de toutes les bases : ~~~{.sql}