Find large MySQL tables
To identify the large tables, connect to the database as described in the Connect to the database article, and run the following command, where
project_id is your Cloud project ID:
SELECT TABLE_NAME AS `Table`,
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
WHERE TABLE_SCHEMA = "<project_id>"
ORDER BY (DATA_LENGTH + INDEX_LENGTH) DESC;
This would display the complete list of tables and their size. You can go through the list and identify which tables require attention because of the big size.