Finding MySQL Table Size / Disk Usage

Unix

02 Sep 2015

Finding MySQL Table Size / Disk Usage

Preston Garrison 0 Comments

Here is a simple sql query that will let you see how much space a table is taking in mysql:

 

SELECT table_name, round(((data_length + index_length) / (1024*1024)),2) as "size in megs" FROM information_schema.tables WHERE table_schema = "db_name";