From 7c9b22220e7e68b000f0526f10474109846373cd Mon Sep 17 00:00:00 2001 From: lpoujol Date: Thu, 7 Nov 2019 16:28:34 +0100 Subject: [PATCH] =?UTF-8?q?Compl=C3=A9ment=20taille=20donn=C3=A9es/index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoMySQL.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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}