@@ -6,29 +6,62 @@ This table contains information about events that occurred with [data parts](../
The `system.part_log` table contains the following columns:
-`event_type` (Enum) — Type of the event that occurred with the data part. Can have one of the following values:
-`query_id` ([String](../../sql-reference/data-types/string.md)) — Id of the query to insert data parts.
-`event_type` ([Enum8](../../sql-reference/data-types/enum.md)) — Type of the event that occurred with the data part. Can have one of the following values:
-`NEW_PART` — Inserting of a new data part.
-`MERGE_PARTS` — Merging of data parts.
-`DOWNLOAD_PART` — Downloading a data part.
-`REMOVE_PART` — Removing or detaching a data part using [DETACH PARTITION](../../sql-reference/statements/alter/partition.md#alter_detach-partition).
-`MUTATE_PART` — Mutating of a data part.
-`MOVE_PART` — Moving the data part from the one disk to another one.
-`event_date` (Date) — Event date.
-`event_time` (DateTime) — Event time.
-`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 ‘all’ value if the partitioning is by `tuple()`.
-`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.
-`error` (UInt16) — The code number of the occurred error.
-`exception` (String) — Text message of the occurred error.
-`database` ([String](../../sql-reference/data-types/string.md)) — Name of the database the data part is in.
-`table` ([String](../../sql-reference/data-types/string.md)) — Name of the table the data part is in.
-`part_name` ([String](../../sql-reference/data-types/string.md)) — Name of the data part.
-`partition_id` ([String](../../sql-reference/data-types/string.md)) — ID of the partition that the data part was inserted to. The column takes the ‘all’ value if the partitioning is by `tuple()`.
-`path_on_disk` ([String](../../sql-reference/data-types/string.md)) — Absolute path to the folder with data part files.
-`rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — The number of rows in the data part.
-`size_in_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Size of the data part in bytes.
-`merged_from` ([Array(String)](../../sql-reference/data-types/array.md)) — An array of names of the parts which the current part was made up from (after the merge).
-`bytes_uncompressed` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Size of uncompressed bytes.
-`read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — The number of rows was read during the merge.
-`read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — The number of bytes was read during the merge.
-`peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — The maximum difference between the amount of allocated and freed memory in context of this thread.
-`error` ([UInt16](../../sql-reference/data-types/int-uint.md)) — The code number of the occurred error.
-`exception` ([String](../../sql-reference/data-types/string.md)) — Text message of the occurred error.
The `system.part_log` table is created after the first inserting data to the `MergeTree` table.
-`event_type` (Enum) — тип события. Столбец может содержать одно из следующих значений:
-`query_id` ([String](../../sql-reference/data-types/string.md)) — идентификатор запроса на вставку кусков данных.
-`event_type` ([Enum8](../../sql-reference/data-types/enum.md)) — тип события. Столбец может содержать одно из следующих значений:
-`NEW_PART` — вставка нового куска.
-`MERGE_PARTS` — слияние кусков.
-`DOWNLOAD_PART` — загрузка с реплики.
-`REMOVE_PART` — удаление или отсоединение из таблицы с помощью [DETACH PARTITION](../../sql-reference/statements/alter/partition.md#alter_detach-partition).
-`MUTATE_PART` — изменение куска.
-`MOVE_PART` — перемещение куска между дисками.
-`event_date` (Date) — дата события.
-`event_time` (DateTime) — время события.
-`duration_ms` (UInt64) — длительность.
-`database` (String) — имя базы данных, в которой находится кусок.
-`table` (String) — имя таблицы, в которой находится кусок.
-`part_name` (String) — имя куска.
-`partition_id` (String) — идентификатор партиции, в которую был добавлен кусок. В столбце будет значение ‘all’, если таблица партициируется по выражению `tuple()`.
-`rows` (UInt64) — число строк в куске.
-`size_in_bytes` (UInt64) — размер куска данных в байтах.
-`merged_from` (Array(String)) — массив имён кусков, из которых образован текущий кусок в результате слияния (также столбец заполняется в случае скачивания уже смерженного куска).
-`bytes_uncompressed` (UInt64) — количество прочитанных разжатых байт.
-`read_rows` (UInt64) — сколько было прочитано строк при слиянии кусков.
-`read_bytes` (UInt64) — сколько было прочитано байт при слиянии кусков.
-`error` (UInt16) — код ошибки, возникшей при текущем событии.
-`exception` (String) — текст ошибки.
-`event_date` ([Date](../../sql-reference/data-types/date.md)) — дата события.
-`event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — время события.
-`database` ([String](../../sql-reference/data-types/string.md)) — имя базы данных, в которой находится кусок.
-`table` ([String](../../sql-reference/data-types/string.md)) — имя таблицы, в которой находится кусок.
-`part_name` ([String](../../sql-reference/data-types/string.md)) — имя куска.
-`partition_id` ([String](../../sql-reference/data-types/string.md)) — идентификатор партиции, в которую был добавлен кусок. В столбце будет значение ‘all’, если таблица партициируется по выражению `tuple()`.
-`path_on_disk` ([String](../../sql-reference/data-types/string.md)) — абсолютный путь к папке с файлами кусков данных.
-`rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — число строк в куске.
-`size_in_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — размер куска данных в байтах.
-`merged_from` ([Array(String)](../../sql-reference/data-types/array.md)) — массив имён кусков, из которых образован текущий кусок в результате слияния (также столбец заполняется в случае скачивания уже смерженного куска).
-`bytes_uncompressed` ([UInt64](../../sql-reference/data-types/int-uint.md)) — количество прочитанных разжатых байт.
-`read_rows` ([UInt64](../../sql-reference/data-types/int-uint.md)) — сколько было прочитано строк при слиянии кусков.
-`read_bytes` ([UInt64](../../sql-reference/data-types/int-uint.md)) — сколько было прочитано байт при слиянии кусков.
-`peak_memory_usage` ([Int64](../../sql-reference/data-types/int-uint.md)) — максимальная разница между выделенной и освобождённой памятью в контексте потока.
-`error` ([UInt16](../../sql-reference/data-types/int-uint.md)) — код ошибки, возникшей при текущем событии.
-`exception` ([String](../../sql-reference/data-types/string.md)) — текст ошибки.
Системная таблица `system.part_log` будет создана после первой вставки данных в таблицу `MergeTree`.