1

I have a large Mysql database. Its size is more than what I expected.

How can I find size of its tables ? I need to find that table makes the database size huge.

Thank you.

Charles
  • 50,943
  • 13
  • 104
  • 142
hd.
  • 17,596
  • 46
  • 115
  • 165

2 Answers2

2

You can do it as below.

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

Read Here

Dipesh Parmar
  • 27,090
  • 8
  • 61
  • 90
-1

use this query

show table status from <db_name>;

if your database name is users; then use this :

show table status from users;

Check This - Mysql Manual

Suhel Meman
  • 3,702
  • 1
  • 18
  • 26