table_size
This is an old revision of the document!
Size of a table in a db
Note: You will need to replace DATABASE_NAME and TABLE_NAME.
SELECT table_name AS "Table", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "$DATABASE_NAME" AND table_name = "$TABLE_NAME";
table_size.1487839712.txt.gz · Last modified: 2024/05/23 07:26 (external edit)