Created
January 18, 2018 13:43
-
Star
(256)
You must be signed in to star a gist -
Fork
(35)
You must be signed in to fork a gist
-
-
Save sanchezzzhak/511fd140e8809857f8f1d84ddb937015 to your computer and use it in GitHub Desktop.
clickhouse get tables size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table, | |
formatReadableSize(sum(bytes)) as size, | |
min(min_date) as min_date, | |
max(max_date) as max_date | |
FROM system.parts | |
WHERE active | |
GROUP BY table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everyone, I new to Clickhouse. But my use case is also similar. I want to develop a time-series based dashboard in Grafana which shows how all table's size varies in a timely fashion. Does anyone has an idea how to get that done. Like my query just gives the table size for current time. I want table size over a period of time. Can someone please help.