Biggest tables

from the Artful MySQL Tips List



select 
  table_schema, 
  table_name, 
  round(sum(data_length + index_length)/1024/1024, 2) as tblsizeMB 
from information_schema.tables 
group by table_schema,table_name 
order by tblsizeMB desc limit 50


If many table sizes are in the GB range ...

select 
  table_schema, 
  table_name, 
  round(sum(data_length + index_length)/1024/1024/1024, 2) as tblsizeGB 
from information_schema.tables 
group by table_schema,table_name 
order by tblsizeGB desc limit 50


Return to the Artful MySQL Tips page