> ## 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.

> 包含 MergeTree 家族中的表当前正在执行的合并和 part mutation 信息的系统表。

# system.merges

<Info>
  **在 ClickHouse Cloud 中查询**

  此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此，如需查看所有数据的完整情况，需要使用 `clusterAllReplicas` 函数。更多详情请参见[此处](/zh/reference/system-tables/overview#system-tables-in-clickhouse-cloud)。
</Info>

<div id="description">
  ## 描述
</div>

包含 MergeTree 家族中的表当前正在进行的合并和 part mutation 的相关信息。

<div id="columns">
  ## 列
</div>

* `database` ([String](/zh/reference/data-types/index)) — 该表所在数据库的名称。
* `table` ([String](/zh/reference/data-types/index)) — 表名。
* `elapsed` ([Float64](/zh/reference/data-types/index)) — 自合并开始以来经过的时间 (以秒为单位) 。
* `progress` ([Float64](/zh/reference/data-types/index)) — 已完成工作的百分比，范围为 0 到 1。
* `num_parts` ([UInt64](/zh/reference/data-types/index)) — 待合并的 parts 数量。
* `source_part_names` ([Array(String)](/zh/reference/data-types/index)) — 源 parts 的名称列表。
* `result_part_name` ([String](/zh/reference/data-types/index)) — 合并后生成的 part 名称。
* `source_part_paths` ([Array(String)](/zh/reference/data-types/index)) — 每个源 part 的路径列表。
* `result_part_path` ([String](/zh/reference/data-types/index)) — 合并后生成的 part 路径。
* `partition_id` ([String](/zh/reference/data-types/index)) — 正在进行合并的分区标识符。
* `partition` ([String](/zh/reference/data-types/index)) — 分区名称
* `is_mutation` ([UInt8](/zh/reference/data-types/index)) — 如果此过程是 part mutation，则值为 1。
* `total_size_bytes_compressed` ([UInt64](/zh/reference/data-types/index)) — 合并后各块中压缩数据的总大小。
* `total_size_bytes_uncompressed` ([UInt64](/zh/reference/data-types/index)) — 合并后各块中未压缩数据的总大小。
* `total_size_marks` ([UInt64](/zh/reference/data-types/index)) — 已合并 parts 中标记的总数。
* `bytes_read_uncompressed` ([UInt64](/zh/reference/data-types/index)) — 读取的未压缩字节数。
* `rows_read` ([UInt64](/zh/reference/data-types/index)) — 读取的行数。
* `bytes_written_uncompressed` ([UInt64](/zh/reference/data-types/index)) — 写入的未压缩字节数。
* `rows_written` ([UInt64](/zh/reference/data-types/index)) — 写入的行数。
* `columns_written` ([UInt64](/zh/reference/data-types/index)) — 写入的列数 (适用于垂直合并算法) 。
* `memory_usage` ([UInt64](/zh/reference/data-types/index)) — 合并过程的内存消耗。
* `thread_id` ([UInt64](/zh/reference/data-types/index)) — 合并过程的线程 ID。
* `merge_type` ([String](/zh/reference/data-types/index)) — 当前合并的类型。如果这是变更操作，则为空。
* `merge_algorithm` ([String](/zh/reference/data-types/index)) — 当前合并使用的算法。如果这是变更操作，则为空。
* `current_projection` ([String](/zh/reference/data-types/index)) — 当前正在合并或重建的投影名称。如果当前不处于投影合并阶段，则为空。
* `current_projection_progress` ([Float64](/zh/reference/data-types/index)) — 当前投影合并的进度，范围为 0 到 1。
* `current_projection_parts_merging` ([UInt64](/zh/reference/data-types/index)) — 当前正在合并的 projection parts 数量。
* `current_projection_parts_remaining` ([UInt64](/zh/reference/data-types/index)) — 当前投影中剩余待合并的 projection parts 数量。
* `projections_completed` ([Array(String)](/zh/reference/data-types/index)) — 到目前为止已完成合并或重建的投影列表。
* `projections_remaining` ([Array(String)](/zh/reference/data-types/index)) — 仍需合并或重建的投影列表。
