DEV Community

Javier Vidal
Javier Vidal

Posted on • Updated on

Tables size in ClickHouse

We can check the size of ClickHouse tables with this query:

SELECT
    concat(database, '.', table) AS table,
    formatReadableSize(sum(bytes)) AS size,
    sum(bytes) AS bytes_size,
    sum(rows) AS rows,
    max(modification_time) AS latest_modification,
    any(engine) AS engine
FROM system.parts
WHERE active
GROUP BY
    database,
    table
ORDER BY bytes_size DESC
Enter fullscreen mode Exit fullscreen mode

Discussion (0)