Slackbot
12/03/2022, 3:54 AMSrikanth Chekuri
12/03/2022, 5:10 AMSELECT
database,
table,
formatReadableSize(sum(data_compressed_bytes) AS size) AS compressed,
formatReadableSize(sum(data_uncompressed_bytes) AS usize) AS uncompressed,
round(usize / size, 2) AS compr_rate,
sum(rows) AS rows,
count() AS part_count
FROM system.parts
WHERE (active = 1) AND (database LIKE '%') AND (table LIKE '%')
GROUP BY
database,
table
ORDER BY size DESC;
It gives you the tables and their sizes. We will know which ones have the maximum size and take some actionAilen
12/03/2022, 6:05 AMSrikanth Chekuri
12/03/2022, 7:40 AMAilen
12/03/2022, 9:17 AMAilen
12/03/2022, 9:20 AMAilen
12/03/2022, 9:42 AMSrikanth Chekuri
12/03/2022, 11:15 AM