User Tools

Site Tools


table_size

Size of a tables in a db

Note: You will need to replace DATABASE_NAME

SELECT table_name AS "Table",

round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"

FROM information_schema.TABLES

WHERE table_schema = "DATABASE_NAME"

ORDER BY (data_length + index_length) DESC LIMIT 15;

table_size.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1