Tables size in ClickHouse

Tables size in ClickHouse

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

  1. SELECT
  2.     concat(database, '.', table) AS table,
  3.     formatReadableSize(sum(bytes)) AS size,
  4.     sum(bytes) AS bytes_size,
  5.     sum(rows) AS rows,
  6.     max(modification_time) AS latest_modification,
  7.     any(engine) AS engine
  8. FROM system.parts
  9. WHERE active
  10. GROUP BY
  11.     database,
  12.     table
  13. ORDER BY bytes_size DESC