Skip to content

Instantly share code, notes, and snippets.

@franc3000
Last active October 31, 2017 17:05
Show Gist options
  • Save franc3000/9abace01a01e8189d7f49ca8fada9702 to your computer and use it in GitHub Desktop.
Save franc3000/9abace01a01e8189d7f49ca8fada9702 to your computer and use it in GitHub Desktop.
db table sizes
SELECT
table_schema,
table_name,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`,
sum(table_rows) Rows
FROM information_schema.TABLES
WHERE table_schema='paretodb'
GROUP BY 1,2
ORDER BY (data_length + index_length) DESC
LIMIT 100
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment