Skip to content

Instantly share code, notes, and snippets.

View kymtwyf's full-sized avatar
:octocat:

Wu Yongfeng kymtwyf

:octocat:
View GitHub Profile
select concat(database, '.', table) as table,
formatReadableSize(sum(bytes)) as size,
sum(rows) as rows,
max(modification_time) as latest_modification,
sum(bytes) as bytes_size,
any(engine) as engine,
formatReadableSize(sum(primary_key_bytes_in_memory)) as primary_keys_size
from system.parts
where active
group by database, table