Skip to content

Instantly share code, notes, and snippets.

@danielmme
Last active July 11, 2018 11:55
Show Gist options
  • Save danielmme/7f9b9d293782e101f7948a6c5dd1019a to your computer and use it in GitHub Desktop.
Save danielmme/7f9b9d293782e101f7948a6c5dd1019a to your computer and use it in GitHub Desktop.
select table_name as "Table Name",sum(data_length+index_length)/1024/1024 as "Table Size in MB" from information_schema.tables;
select table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'database name';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment