Check MySQL Table Size: Easy SQL Query
You can use the following SQL statement to check the space size of each table in MySQL:
SELECT
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)`
FROM information_schema.TABLES
WHERE table_schema = 'your_database_name'
ORDER BY (data_length + index_length) DESC;
Please replace your_database_name with the name of the database you want to query. This SQL statement will list the space size of all tables in the database and arrange them in descending order of space size.