system.parts
Contains information about parts of MergeTree tables.
Each row describes one data part.
Columns:
- 
partition(String) – The partition name. To learn what a partition is, see the description of the ALTER query.Formats: - YYYYMMfor automatic partitioning by month.
- any_stringwhen partitioning manually.
 
- 
name(String) – Name of the data part. The part naming structure can be used to determine many aspects of the data, ingest, and merge patterns. The part naming format is the following:
- Definitions:
- partition_id- identifies the partition key
- minimum_block_number- identifies the minimum block number in the part. ClickHouse always merges continuous blocks
- maximum_block_number- identifies the maximum block number in the part
- level- incremented by one with each additional merge on the part. A level of 0 indicates this is a new part that has not been merged. It is important to remember that all parts in ClickHouse are always immutable
- data_version- optional value, incremented when a part is mutated (again, mutated data is always only written to a new part, since parts are immutable)
 
- 
uuid(UUID) - The UUID of data part.
- 
part_type(String) — The data part storing format.Possible Values: - 
Wide— Each column is stored in a separate file in a filesystem.
- 
Compact— All columns are stored in one file in a filesystem.Data storing format is controlled by the min_bytes_for_wide_partandmin_rows_for_wide_partsettings of the MergeTree table.
 
- 
- 
active(UInt8) – Flag that indicates whether the data part is active. If a data part is active, it's used in a table. Otherwise, it's deleted. Inactive data parts remain after merging.
- 
marks(UInt64) – The number of marks. To get the approximate number of rows in a data part, multiplymarksby the index granularity (usually 8192) (this hint does not work for adaptive granularity).
- 
rows(UInt64) – The number of rows.
- 
bytes_on_disk(UInt64) – Total size of all the data part files in bytes.
- 
data_compressed_bytes(UInt64) – Total size of compressed data in the data part. All the auxiliary files (for example, files with marks) are not included.
- 
data_uncompressed_bytes(UInt64) – Total size of uncompressed data in the data part. All the auxiliary files (for example, files with marks) are not included.
- 
primary_key_size(UInt64) – The amount of memory (in bytes) used by primary key values in the primary.idx/cidx file on disk.
- 
marks_bytes(UInt64) – The size of the file with marks.
- 
secondary_indices_compressed_bytes(UInt64) – Total size of compressed data for secondary indices in the data part. All the auxiliary files (for example, files with marks) are not included.
- 
secondary_indices_uncompressed_bytes(UInt64) – Total size of uncompressed data for secondary indices in the data part. All the auxiliary files (for example, files with marks) are not included.
- 
secondary_indices_marks_bytes(UInt64) – The size of the file with marks for secondary indices.
- 
modification_time(DateTime) – The time the directory with the data part was modified. This usually corresponds to the time of data part creation.
- 
remove_time(DateTime) – The time when the data part became inactive.
- 
refcount(UInt32) – The number of places where the data part is used. A value greater than 2 indicates that the data part is used in queries or merges.
- 
min_date(Date) – The minimum value of the date key in the data part.
- 
max_date(Date) – The maximum value of the date key in the data part.
- 
min_time(DateTime) – The minimum value of the date and time key in the data part.
- 
max_time(DateTime) – The maximum value of the date and time key in the data part.
- 
partition_id(String) – ID of the partition.
- 
min_block_number(UInt64) – The minimum data block number that makes up the current part after merging.
- 
max_block_number(UInt64) – The maximum data block number that makes up the current part after merging.
- 
level(UInt32) – Depth of the merge tree. Zero means that the current part was created by insert rather than by merging other parts.
- 
data_version(UInt64) – Number that is used to determine which mutations should be applied to the data part (mutations with a version higher thandata_version).
- 
primary_key_bytes_in_memory(UInt64) – The amount of memory (in bytes) used by primary key values (will be0in case ofprimary_key_lazy_load=1anduse_primary_key_cache=1).
- 
primary_key_bytes_in_memory_allocated(UInt64) – The amount of memory (in bytes) reserved for primary key values (will be0in case ofprimary_key_lazy_load=1anduse_primary_key_cache=1).
- 
is_frozen(UInt8) – Flag that shows that a partition data backup exists. 1, the backup exists. 0, the backup does not exist. For more details, see FREEZE PARTITION
- 
database(String) – Name of the database.
- 
table(String) – Name of the table.
- 
engine(String) – Name of the table engine without parameters.
- 
path(String) – Absolute path to the folder with data part files.
- 
disk_name(String) – Name of a disk that stores the data part.
- 
hash_of_all_files(String) – sipHash128 of compressed files.
- 
hash_of_uncompressed_files(String) – sipHash128 of uncompressed files (files with marks, index file etc.).
- 
uncompressed_hash_of_compressed_files(String) – sipHash128 of data in the compressed files as if they were uncompressed.
- 
delete_ttl_info_min(DateTime) — The minimum value of the date and time key for TTL DELETE rule.
- 
delete_ttl_info_max(DateTime) — The maximum value of the date and time key for TTL DELETE rule.
- 
move_ttl_info.expression(Array(String)) — Array of expressions. Each expression defines a TTL MOVE rule.
The move_ttl_info.expression array is kept mostly for backward compatibility, now the simplest way to check TTL MOVE rule is to use the move_ttl_info.min and move_ttl_info.max fields.
- 
move_ttl_info.min(Array(DateTime)) — Array of date and time values. Each element describes the minimum key value for a TTL MOVE rule.
- 
move_ttl_info.max(Array(DateTime)) — Array of date and time values. Each element describes the maximum key value for a TTL MOVE rule.
- 
bytes(UInt64) – Alias forbytes_on_disk.
- 
marks_size(UInt64) – Alias formarks_bytes.
Example
See Also
