deankarn
deankarn

Reputation: 460

Clickhouse system.parts table column definitions

I am currently gathering metrics from Clickhouse's system tables and when grabbing information from the system.parts table there are a bunch of columns listed that are not documented, can anyone help explain what the following columns represent:

I am specifically interested in knowing the primary key's index size, but am having trouble determining the difference between the two primary key columns above.

Upvotes: 1

Views: 899

Answers (1)

Nikolai Kochetov
Nikolai Kochetov

Reputation: 46

  • level - depth of the merge tree that formed part. It's 0 for newly created part, and is calculated as max of levels after merge
  • primary_key_bytes_in_memory - total size of index in bytes (may be approximate)
  • primary_key_bytes_in_memory_allocated - total size of memory, allocated for index

Since index is stored in memory, it's expected that primary_key_bytes_in_memory_allocated >= primary_key_bytes_in_memory. It's connected with difference between capacity and size for standard containers.

Upvotes: 3

Related Questions