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

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki