Skip to content

Instantly share code, notes, and snippets.

@stepansib
Created August 30, 2018 08:51
Show Gist options
  • Save stepansib/38d19676e9d907e8eee17515d9cfd2b8 to your computer and use it in GitHub Desktop.
Save stepansib/38d19676e9d907e8eee17515d9cfd2b8 to your computer and use it in GitHub Desktop.
#crm database size
SELECT
table_schema AS `Database`,
table_name AS `Table`,
ROUND(
(
(data_length + index_length) / 1024 / 1024
),
2
) `MB`,
TABLE_ROWS AS `Rows`
FROM
information_schema.TABLES
WHERE table_schema = 'crm'
ORDER BY (data_length + index_length) DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment