published by whitemice on Thu, 04/18/2019 - 14:30
This is a query to report the number of rows and the estimated size of all the tables in a MySQL database:
SELECT
table_name,
table_rows,
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS mb_size
FROM information_schema.tables
WHERE table_schema = 'maindb;
Results look like: