Created
March 15, 2024 13:22
-
-
Save redsquare/234fd57b0ed450c1ba40cb10e8f7374b to your computer and use it in GitHub Desktop.
clickhouse_parts.sql
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, | |
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