Understanding clickhouse partitions

580 views
Skip to first unread message

Suman Reddy

unread,
Aug 9, 2018, 11:31:13 AM8/9/18
to ClickHouse
I see that clickhouse created multiple directories for each partition key(in each node).
Documentation says the directory name format is : “<partition ID>_<minimum block number>_<maximum block number>_ <level>” .
Any idea what is “level” here?
347 distinct partition keys on one node(for one table) created 1358 directories.   (custom partitioning)

The documentation recommends not to have more than 1000 partitions. Should we just keep in mind the number of partitions keys or the number of directories also?

Also, Is there a configuration on how to control this number of directories?



123.png

Denis Zhuravlev

unread,
Aug 9, 2018, 12:27:15 PM8/9/18
to ClickHouse
you confused parts and partitions. Basically every insert and merge create new parts.

my table x has only 2 partitions:

select count(distinct partition)  from system.parts  where table in ('x') and active
2

but it has 1877 parts
select count()  from system.parts  where   table in ('x')1877  -- most of them inactive and will be removed soon (<10min).
1877

select count() from system.parts  where   table in ('x') and active
33

As I understand level it's an internal info for merge process.


Reply all
Reply to author
Forward
0 new messages