How to Check Table Sizes in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Aggregate system.parts, filtering on active parts, to get compressed size and row counts per table. formatReadableSize makes the byte counts human friendly.
SELECT table,
formatReadableSize(sum(bytes_on_disk)) AS size,
sum(rows) AS rows,
count() AS parts
FROM system.parts
WHERE active AND database = 'analytics'
GROUP BY table
ORDER BY sum(bytes_on_disk) DESC;Size per column
SELECT name,
formatReadableSize(data_compressed_bytes) AS compressed,
formatReadableSize(data_uncompressed_bytes) AS uncompressed
FROM system.columns
WHERE database = 'analytics' AND table = 'events'
ORDER BY data_compressed_bytes DESC;Always filter WHERE active = 1: inactive parts are leftovers from merges awaiting cleanup and would double-count sizes.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free