Created
December 17, 2020 11:04
-
-
Save mrk-andreev/165782140ee34520ac45a6fa708c283b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
order by bytes_size desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment