Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql list tables by size

/*replace your_database_name with your db name, and then run this:*/
SELECT TABLE_NAME, table_rows, data_length, index_length, 
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "your_database_name"
ORDER BY (data_length + index_length) DESC;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #list #tables #size
ADD COMMENT
Topic
Name
3+3 =