Check the sizes of tables in the database! (2)

Cover Image for Check the sizes of tables in the database! (2)
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;


More Stories

Cover Image for Check the sizes of table

Check the sizes of table

Check the sizes of tables in the database.

Adou
Adou
Cover Image for Check the sizes of tables in the database! (1)eweer

Check the sizes of tables in the database! (1)eweer

Check the sizes of tables in the database.

Adou
Adou