Check the sizes of tables in the database! (1)
Adou
Adou
select table_schema as 'table_schema', sum(table_rows) as 'table_rows', sum(truncate(data_length/1024/1024, 2)) as 'data_length(MB)', sum(truncate(index_length/1024/1024, 2)) as 'index_length(MB)' from information_schema.tables where table_schema='xxx';
select table_schema , table_name , table_rows, truncate(data_length/1024/1024, 2) as 'data_length(MB)', truncate(index_length/1024/1024, 2) as 'index_length(MB)' from information_schema.tables where table_schema='xxx' order by data_length desc, index_length desc;