Skip to content

Instantly share code, notes, and snippets.

@Teketel
Created February 22, 2018 13:46
Show Gist options
  • Save Teketel/a9b2972d51d7c762d88b93d836ac5cab to your computer and use it in GitHub Desktop.
Save Teketel/a9b2972d51d7c762d88b93d836ac5cab to your computer and use it in GitHub Desktop.
SELECT table_schema AS "Database",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"
FROM information_schema.TABLES
GROUP BY table_schema;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment