SHOW DATABASES;
SELECT TABLE_SCHEMA,
COUNT(TABLE_NAME) as tableCount,
SUM(Data_Length)/1048576 as tablespaceUsedMB,
SUM(Index_Length)/1048576 as indexMB,
SUM(DATA_LENGTH+INDEX_LENGTH)/1048576 as totalDatabaseSize
FROM INFORMATION_SCHEMA.TABLES GROUP BY TABLE_SCHEMA;
No comments:
Post a Comment