0 like 0 dislike
569 views
in Education & Reference by

1 Answer

0 like 0 dislike
by
 
Best answer
mysql> SELECT table_schema "Data Base Name", sum( data_length + index_length) / 1024 / 1024
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;
+--------------------+----------------------+
| Data Base Name     | Data Base Size in MB |
+--------------------+----------------------+
| information_schema |           0.00781250 |
| mysql              |           0.64053249 |
+--------------------+----------------------+

Determine size of all tables in a database

SELECT TABLE_NAME, table_rows, data_length, index_length, 
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "schema_name";

Replace "schema_name" with the name of one of your databases.

Related questions

0 like 0 dislike
1 answer 168 views
1 like 0 dislike
1 answer 55 views
1 like 0 dislike
1 answer 2 views
1 like 0 dislike
1 answer 608 views
0 like 0 dislike
3 answers 742 views
0 like 0 dislike
1 answer 134 views
0 like 0 dislike
1 answer 103 views
0 like 0 dislike
1 answer 800 views
0 like 0 dislike
1 answer 503 views
...