Created
January 18, 2018 13:43
-
-
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 |
@alexeyantropov do you mind to add some custom queries? Have you finished to code a little exporter?
@alexeyantropov do you mind to add some custom queries? Have you finished to code a little exporter?
I've finished and use it in my production environment. But sure I can add some extra queries and metrics. What have you to suggest?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mmm... Smth like this https://github.com/alexeyantropov/clickhouse_table_exporter/blob/main/src/exporter.py