Skip to content

Instantly share code, notes, and snippets.

@jkappers
Created March 4, 2014 20:01
Show Gist options
  • Save jkappers/9354433 to your computer and use it in GitHub Desktop.
Save jkappers/9354433 to your computer and use it in GitHub Desktop.
Get table sizes in sql
select table_name,
round((data_length + index_length)/1024/1024/1024, 2) as `gb`
from information_schema.tables
where table_schema = "schema"
order by `gb` desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment