Last active
March 15, 2024 13:24
-
-
Save redsquare/09b4f882c83bbced00ba57b258c4f0e8 to your computer and use it in GitHub Desktop.
clickhouse parts query
This file contains hidden or 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, | |
partition_id, | |
count(name) AS parts, | |
formatReadableSize(sum(bytes_on_disk)) AS size | |
FROM system.parts | |
WHERE (table = 'qw_3_requests_quotes') AND active AND (toUInt32(partition_id) < 20231001) | |
GROUP BY | |
table, | |
partition_id | |
WITH TOTALS | |
ORDER BY | |
table ASC, | |
partition_id ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment