> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-fbfa8bee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing information about parts of MergeTree

# system.parts

<h2 id="description">
  Description
</h2>

Contains information about parts of [MergeTree](/reference/engines/table-engines/mergetree-family/mergetree) tables.

Each row describes one data part.

<h2 id="columns">
  Columns
</h2>

* `partition` ([String](/reference/data-types/index)) — Partition identifier (string representation derived from the table partition key expression).
* `name` ([String](/reference/data-types/index)) —
  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:

```text theme={null}
<partition_id>_<minimum_block_number>_<maximum_block_number>_<level>_<data_version>
```

* 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](/reference/data-types/index)) — The UUID of data part.
- `part_type` ([String](/reference/data-types/index)) — The data part storing format. Possible values: `Wide` — each column is stored in a separate file, `Compact` — all columns are stored in one file. Data storing format is controlled by the `min_bytes_for_wide_part` and `min_rows_for_wide_part` settings of the MergeTree table.
- `active` ([UInt8](/reference/data-types/index)) — Flag that indicates whether the data part is active. If a data part is active, it's used in a table. Otherwise, it's about to be deleted. Inactive data parts appear after merging and mutating operations.
- `marks` ([UInt64](/reference/data-types/index)) — The number of marks. To get the approximate number of rows in a data part, multiply marks by the index granularity (usually 8192) (this hint does not work for adaptive granularity).
- `rows` ([UInt64](/reference/data-types/index)) — The number of rows.
- `files` ([UInt64](/reference/data-types/index)) — The number of files in the data part.
- `bytes_on_disk` ([UInt64](/reference/data-types/index)) — Total size of all the data part files in bytes.
- `data_compressed_bytes` ([UInt64](/reference/data-types/index)) — 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](/reference/data-types/index)) — 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](/reference/data-types/index)) — The amount of memory (in bytes) used by primary key values in the primary.idx/cidx file on disk.
- `marks_bytes` ([UInt64](/reference/data-types/index)) — The size of the file with marks.
- `secondary_indices_compressed_bytes` ([UInt64](/reference/data-types/index)) — 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](/reference/data-types/index)) — 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](/reference/data-types/index)) — The size of the file with marks for secondary indices.
- `modification_time` ([DateTime](/reference/data-types/index)) — The time the directory with the data part was modified. This usually corresponds to the time of data part creation.
- `remove_time` ([DateTime](/reference/data-types/index)) — The time when the data part became inactive.
- `refcount` ([UInt32](/reference/data-types/index)) — 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](/reference/data-types/index)) — The minimum value of the date key in the data part.
- `max_date` ([Date](/reference/data-types/index)) — The maximum value of the date key in the data part.
- `min_time` ([DateTime](/reference/data-types/index)) — The minimum value of the date and time key in the data part.
- `max_time` ([DateTime](/reference/data-types/index)) — The maximum value of the date and time key in the data part.
- `partition_id` ([String](/reference/data-types/index)) — ID of the partition.
- `min_block_number` ([Int64](/reference/data-types/index)) — The minimum number of data parts that make up the current part after merging.
- `max_block_number` ([Int64](/reference/data-types/index)) — The maximum number of data parts that make up the current part after merging.
- `level` ([UInt32](/reference/data-types/index)) — Depth of the merge tree. Zero means that the current part was created by insert rather than by merging other parts.
- `data_version` ([UInt64](/reference/data-types/index)) — Number that is used to determine which mutations should be applied to the data part (mutations with a version higher than data\_version).
- `primary_key_bytes_in_memory` ([UInt64](/reference/data-types/index)) — The amount of memory (in bytes) used by primary key values. Will be 0 when `primary_key_lazy_load` is enabled and the key is not loaded. When non-zero the bytes live in the part itself and are accounted within `jemalloc.mergetree_arena.active_bytes`. They are NEVER counted in `PrimaryIndexCacheBytes` — those are mutually exclusive per part: an index lives either in the part (this metric) or in the shared `PrimaryIndexCache` (the other), depending on `primary_key_lazy_load` and `use_primary_key_cache`.
- `primary_key_bytes_in_memory_allocated` ([UInt64](/reference/data-types/index)) — The amount of memory (in bytes) reserved for primary key values. Will be 0 when `primary_key_lazy_load` is enabled and the key is not loaded. When non-zero, included in `jemalloc.mergetree_arena.active_bytes`. See the note on `primary_key_bytes_in_memory` for the relationship with `PrimaryIndexCacheBytes`.
- `index_granularity_bytes_in_memory` ([UInt64](/reference/data-types/index)) — The amount of memory (in bytes) used by index granularity values (will be 0 in case of primary\_key\_lazy\_load=1 and use\_primary\_key\_cache=1). When non-zero the bytes are part-owned and accounted within `jemalloc.mergetree_arena.active_bytes`.
- `index_granularity_bytes_in_memory_allocated` ([UInt64](/reference/data-types/index)) — The amount of memory (in bytes) reserved for index granularity values (will be 0 in case of primary\_key\_lazy\_load=1 and use\_primary\_key\_cache=1). When non-zero, included in `jemalloc.mergetree_arena.active_bytes`.
- `is_frozen` ([UInt8](/reference/data-types/index)) — 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](/reference/data-types/index)) — Name of the database.
- `table` ([String](/reference/data-types/index)) — Name of the table.
- `engine` ([String](/reference/data-types/index)) — Name of the table engine without parameters.
- `disk_name` ([String](/reference/data-types/index)) — Name of a disk that stores the data part.
- `path` ([String](/reference/data-types/index)) — Absolute path to the folder with data part files.
- `hash_of_all_files` ([String](/reference/data-types/index)) — sipHash128 of compressed files.
- `hash_of_uncompressed_files` ([String](/reference/data-types/index)) — sipHash128 of uncompressed files (files with marks, index file etc.).
- `uncompressed_hash_of_compressed_files` ([String](/reference/data-types/index)) — sipHash128 of data in the compressed files as if they were uncompressed.
- `delete_ttl_info_min` ([DateTime](/reference/data-types/index)) — The minimum value of the date and time key for TTL DELETE rule.
- `delete_ttl_info_max` ([DateTime](/reference/data-types/index)) — The maximum value of the date and time key for TTL DELETE rule.
- `move_ttl_info.expression` ([Array(String)](/reference/data-types/index)) — Array of expressions. Each expression defines a TTL MOVE rule.
- `move_ttl_info.min` ([Array(DateTime)](/reference/data-types/index)) — Array of date and time values. Each element describes the minimum key value for a TTL MOVE rule.
- `move_ttl_info.max` ([Array(DateTime)](/reference/data-types/index)) — Array of date and time values. Each element describes the maximum key value for a TTL MOVE rule.
- `default_compression_codec` ([String](/reference/data-types/index)) — The name of the codec used to compress this data part (in case when there is no explicit codec for columns).
- `recompression_ttl_info.expression` ([Array(String)](/reference/data-types/index)) — The TTL expression.
- `recompression_ttl_info.min` ([Array(DateTime)](/reference/data-types/index)) — The minimum value of the calculated TTL expression within this part. Used to understand whether we have at least one row with expired TTL.
- `recompression_ttl_info.max` ([Array(DateTime)](/reference/data-types/index)) — The maximum value of the calculated TTL expression within this part. Used to understand whether we have all rows with expired TTL.
- `group_by_ttl_info.expression` ([Array(String)](/reference/data-types/index)) — The TTL expression.
- `group_by_ttl_info.min` ([Array(DateTime)](/reference/data-types/index)) — The minimum value of the calculated TTL expression within this part. Used to understand whether we have at least one row with expired TTL.
- `group_by_ttl_info.max` ([Array(DateTime)](/reference/data-types/index)) — The maximum value of the calculated TTL expression within this part. Used to understand whether we have all rows with expired TTL.
- `rows_where_ttl_info.expression` ([Array(String)](/reference/data-types/index)) — The TTL expression.
- `rows_where_ttl_info.min` ([Array(DateTime)](/reference/data-types/index)) — The minimum value of the calculated TTL expression within this part. Used to understand whether we have at least one row with expired TTL.
- `rows_where_ttl_info.max` ([Array(DateTime)](/reference/data-types/index)) — The maximum value of the calculated TTL expression within this part. Used to understand whether we have all rows with expired TTL.
- `projections` ([Array(String)](/reference/data-types/index)) — The list of projection names calculated for this part.
- `visible` ([UInt8](/reference/data-types/index)) — Flag which indicated whether this part is visible for SELECT queries.
- `creation_tid` ([Tuple(UInt64, UInt64, UUID)](/reference/data-types/index)) — ID of transaction that has created/is trying to create this object.
- `removal_tid_lock` ([UInt64](/reference/data-types/index)) — Hash of removal\_tid, used to lock an object for removal.
- `removal_tid` ([Tuple(UInt64, UInt64, UUID)](/reference/data-types/index)) — ID of transaction that has removed/is trying to remove this object
- `creation_csn` ([UInt64](/reference/data-types/index)) — CSN of transaction that has created this object
- `removal_csn` ([UInt64](/reference/data-types/index)) — CSN of transaction that has removed this object
- `has_lightweight_delete` ([UInt8](/reference/data-types/index)) — The flag which indicated whether the part has lightweight delete mask.
- `last_removal_attempt_time` ([DateTime](/reference/data-types/index)) — The last time the server tried to delete this part.
- `removal_state` ([String](/reference/data-types/index)) — The current state of part removal process.

<h2 id="example">
  Example
</h2>

```sql theme={null}
SELECT * FROM system.parts LIMIT 1 FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
partition:                             tuple()
name:                                  all_1_4_1_6
part_type:                             Wide
active:                                1
marks:                                 2
rows:                                  6
bytes_on_disk:                         310
data_compressed_bytes:                 157
data_uncompressed_bytes:               91
secondary_indices_compressed_bytes:    58
secondary_indices_uncompressed_bytes:  6
secondary_indices_marks_bytes:         48
marks_bytes:                           144
modification_time:                     2020-06-18 13:01:49
remove_time:                           1970-01-01 00:00:00
refcount:                              1
min_date:                              1970-01-01
max_date:                              1970-01-01
min_time:                              1970-01-01 00:00:00
max_time:                              1970-01-01 00:00:00
partition_id:                          all
min_block_number:                      1
max_block_number:                      4
level:                                 1
data_version:                          6
primary_key_bytes_in_memory:           8
primary_key_bytes_in_memory_allocated: 64
is_frozen:                             0
database:                              default
table:                                 months
engine:                                MergeTree
disk_name:                             default
path:                                  /var/lib/clickhouse/data/default/months/all_1_4_1_6/
hash_of_all_files:                     2d0657a16d9430824d35e327fcbd87bf
hash_of_uncompressed_files:            84950cc30ba867c77a408ae21332ba29
uncompressed_hash_of_compressed_files: 1ad78f1c6843bbfb99a2c931abe7df7d
delete_ttl_info_min:                   1970-01-01 00:00:00
delete_ttl_info_max:                   1970-01-01 00:00:00
move_ttl_info.expression:              []
move_ttl_info.min:                     []
move_ttl_info.max:                     []
```

<h2 id="see-also">
  See Also
</h2>

* [MergeTree family](/reference/engines/table-engines/mergetree-family/mergetree)
* [TTL for Columns and Tables](/reference/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl)
