9951 explained code solutions for 126 technologies


mysqlGet largest tables list


SELECT table_name, round(((data_length + index_length) / 1024 / 1024), 2) 'Size, MB'
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC LIMIT 25;ctrl + c
table_name

name of table

round(((data_length + index_length) / 1024 / 1024), 2)

calculates total table size in MB

information_schema.TABLES

system table with all tables meta data

ORDER BY data_length + index_length

show largest tables at the top

LIMIT 25

show 25 largest tables (change to your needs)