Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

return size of tables in mysql

SELECT 
     table_schema as `Database`, 
     table_name AS `Table`, 
     round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 
FROM information_schema.TABLES 
ORDER BY (data_length + index_length) DESC;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #size #tables #mysql
ADD COMMENT
Topic
Name
6+4 =