Skip to content

Instantly share code, notes, and snippets.

@alexey-milovidov
Created July 27, 2016 01:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexey-milovidov/5437d0513fafdbb638d6797390c4a55f to your computer and use it in GitHub Desktop.
Save alexey-milovidov/5437d0513fafdbb638d6797390c4a55f to your computer and use it in GitHub Desktop.
Example of column sizes in graphite table.
:) SELECT name, formatReadableSize(sum(bytes)) FROM system.columns WHERE table = 'graphite_impl' AND database = 'default' GROUP BY name ORDER BY sum(bytes) DESC
SELECT
name,
formatReadableSize(sum(bytes))
FROM system.columns
WHERE (table = 'graphite_impl') AND (database = 'default')
GROUP BY name
ORDER BY sum(bytes) DESC
┌─name──────┬─formatReadableSize(sum(bytes))─┐
│ Time │ 6.47 TiB │
│ Timestamp │ 5.97 TiB │
│ Value │ 3.04 TiB │
│ Path │ 1.12 TiB │
│ Date │ 38.98 GiB │
└───────────┴────────────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment