Skip to content

Instantly share code, notes, and snippets.

@tiller1010
Created April 10, 2024 17:06
Show Gist options
  • Select an option

  • Save tiller1010/a1b0ddfa68053ff40b5657f17beee300 to your computer and use it in GitHub Desktop.

Select an option

Save tiller1010/a1b0ddfa68053ff40b5657f17beee300 to your computer and use it in GitHub Desktop.
Measure a database size in MySQL
select table_schema 'DB', ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables where table_schema = 'SS_sitedb' GROUP BY table_schema;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment