Search This Blog

Tuesday, 29 November 2016

MYSQL database ​size in MB/GB query​ with creation date.

SELECT table_schema "Database Name", create_time, ROUND(SUM(data_length+index_length)/1024/1024, 0)
"Database Size (MB)",ROUND(SUM(data_length+index_length)/1024/1024/1024)
"Database Size (GB)"  FROM information_schema.TABLES GROUP BY table_schema;

No comments:

Post a Comment