title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/part_log.md)

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/docs/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.

The `system.part_log` table is created only if the [part\_log](/docs/operations/server-configuration-parameters/settings#part_log) server setting is specified.

This table contains information about events that occurred with [data parts](/docs/engines/table-engines/mergetree-family/custom-partitioning-key) in the [MergeTree](/docs/engines/table-engines/mergetree-family/mergetree) family tables, such as adding or merging data.

The `system.part_log` table contains the following columns:

- `hostname` ([LowCardinality(String)](/docs/sql-reference/data-types/string)) — Hostname of the server executing the query.
- `query_id` ([String](/docs/sql-reference/data-types/string)) — Identifier of the `INSERT` query that created this data part.
- `event_type` ([Enum8](/docs/sql-reference/data-types/enum)) — Type of the event that occurred with the data part. Can have one of the following values:
  - `NewPart` — Inserting of a new data part.
  - `MergePartsStart` — Merging of data parts has started.
  - `MergeParts` — Merging of data parts has finished.
  - `DownloadPart` — Downloading a data part.
  - `RemovePart` — Removing or detaching a data part using [DETACH PARTITION](/docs/sql-reference/statements/alter/partition#detach-partitionpart).
  - `MutatePartStart` — Mutating of a data part has started.
  - `MutatePart` — Mutating of a data part has finished.
  - `MovePart` — Moving the data part from the one disk to another one.
- `merge_reason` ([Enum8](/docs/sql-reference/data-types/enum)) — The reason for the event with type `MERGE_PARTS`. Can have one of the following values:
  - `NotAMerge` — The current event has the type other than `MERGE_PARTS`.
  - `RegularMerge` — Some regular merge.
  - `TTLDeleteMerge` — Cleaning up expired data.
  - `TTLRecompressMerge` — Recompressing data part with the.
- `merge_algorithm` ([Enum8](/docs/sql-reference/data-types/enum)) — Merge algorithm for the event with type `MERGE_PARTS`. Can have one of the following values:
  - `Undecided`
  - `Horizontal`
  - `Vertical`
- `event_date` ([Date](/docs/sql-reference/data-types/date)) — Event date.
- `event_time` ([DateTime](/docs/sql-reference/data-types/datetime)) — Event time.
- `event_time_microseconds` ([DateTime64](/docs/sql-reference/data-types/datetime64)) — Event time with microseconds precision.
- `duration_ms` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Duration.
- `database` ([String](/docs/sql-reference/data-types/string)) — Name of the database the data part is in.
- `table` ([String](/docs/sql-reference/data-types/string)) — Name of the table the data part is in.
- `table_uuid` ([UUID](/docs/sql-reference/data-types/uuid)) — UUID of the table the data part belongs to.
- `part_name` ([String](/docs/sql-reference/data-types/string)) — Name of the data part.
- `partition_id` ([String](/docs/sql-reference/data-types/string)) — ID of the partition that the data part was inserted to. The column takes the `all` value if the partitioning is by `tuple()`.
- `partition` ([String](/docs/sql-reference/data-types/string)) - The partition name.
- `part_type` ([String](/docs/sql-reference/data-types/string)) - The type of the part. Possible values: Wide and Compact.
- `disk_name` ([String](/docs/sql-reference/data-types/string)) - The disk name data part lies on.
- `path_on_disk` ([String](/docs/sql-reference/data-types/string)) — Absolute path to the folder with data part files.
- `rows` ([UInt64](/docs/sql-reference/data-types/int-uint)) — The number of rows in the data part.
- `size_in_bytes` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Size of the data part in bytes.
- `merged_from` ([Array(String)](/docs/sql-reference/data-types/array)) — An array of names of the parts which the current part was made up from (after the merge or mutations).
- `bytes_uncompressed` ([UInt64](/docs/sql-reference/data-types/int-uint)) — Size of uncompressed bytes.
- `read_rows` ([UInt64](/docs/sql-reference/data-types/int-uint)) — The number of rows was read during the merge.
- `read_bytes` ([UInt64](/docs/sql-reference/data-types/int-uint)) — The number of bytes was read during the merge.
- `peak_memory_usage` ([Int64](/docs/sql-reference/data-types/int-uint)) — The maximum difference between the amount of allocated and freed memory in the context of this thread.
- `error` ([UInt16](/docs/sql-reference/data-types/int-uint)) — The code number of the occurred error.
- `exception` ([String](/docs/sql-reference/data-types/string)) — Text message of the occurred error.
- `mutation_ids` ([Array(String)](/docs/sql-reference/data-types/array)) — An array of mutation IDs applied to the source part (`merged_from`) for the event with type `MutatePartsStart` and `MutateParts`.
- `ProfileEvents` ([Map(String, UInt64)](/docs/sql-reference/data-types/map)) — ProfileEvents that measure different metrics. The description of them can be found in the table [system.events](/docs/operations/system-tables/events).

The `system.part_log` table is created after the first inserting data to the `MergeTree` table.

**Example**

```
SELECT * FROM system.part_log LIMIT 1 FORMAT Vertical;
```