system.part_log
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 for further details.
The system.part_log table is created only if the part_log server setting is specified.
This table contains information about events that occurred with data parts in the MergeTree family tables, such as adding or merging data.
The system.part_log table contains the following columns:
- hostname(LowCardinality(String)) — Hostname of the server executing the query.
- query_id(String) — Identifier of the- INSERTquery that created this data part.
- event_type(Enum8) — 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.
- 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) — 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) — Merge algorithm for the event with type- MERGE_PARTS. Can have one of the following values:- Undecided
- Horizontal
- Vertical
 
- event_date(Date) — Event date.
- event_time(DateTime) — Event time.
- event_time_microseconds(DateTime64) — Event time with microseconds precision.
- duration_ms(UInt64) — Duration.
- database(String) — Name of the database the data part is in.
- table(String) — Name of the table the data part is in.
- part_name(String) — Name of the data part.
- partition_id(String) — ID of the partition that the data part was inserted to. The column takes the- allvalue if the partitioning is by- tuple().
- path_on_disk(String) — Absolute path to the folder with data part files.
- rows(UInt64) — The number of rows in the data part.
- size_in_bytes(UInt64) — Size of the data part in bytes.
- merged_from(Array(String)) — An array of names of the parts which the current part was made up from (after the merge).
- bytes_uncompressed(UInt64) — Size of uncompressed bytes.
- read_rows(UInt64) — The number of rows was read during the merge.
- read_bytes(UInt64) — The number of bytes was read during the merge.
- peak_memory_usage(Int64) — The maximum difference between the amount of allocated and freed memory in context of this thread.
- error(UInt16) — The code number of the occurred error.
- exception(String) — Text message of the occurred error.
The system.part_log table is created after the first inserting data to the MergeTree table.
Example