buy tb-500

Database table disk usage in Mariadb/Mysql

SELECT table_name as “Table”, ROUND(((data_length +index_length) / 1024 / 1024), 2) AS “Size in (MB)” FROM information_schema.TABLES WHERE table_schema = “ayaddb” ORDER BY (data_length + index_length) DESC;

note: ayaddb is the database name that you want to check the table disk size for it

Leave a Reply