A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
Large table sizes can fill database disk volumes, cause downtime, affect data integrity and negatively impact database management tasks. This document will guide you through the steps to identify and troubleshoot large database tables.
SELECT
table_schema AS `Database`,
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES WHERE table_schema = 'exampledb'
ORDER BY (data_length + index_length) DESC
LIMIT 10;
In this example, the cache_render table is 2.8 Gigabytes in size: