You need to enable JavaScript to run this app.
ByteHouse 企业版

ByteHouse 企业版

复制全文
系统表
merges
复制全文
merges

merges 包含有关当前正在进行的合并(merge)和 part mutation 的信息,适用于 MergeTree 系列的表。

列名

字段名称

数据类型

字段含义说明

database

String

表所在数据库的名称。

table

String

表名。

elapsed

Float64

自合并开始以来经过的时间(单位:秒)。

progress

Float64

已完成工作的百分比,范围从 0 到 1。

num_parts

UInt64

要合并的 part 数量。

source_part_names

Array(String)

要合并的 part 名称。

result_part_name

String

合并后形成的 part 的名称。

source_part_paths

Array(String)

要合并的 part 路径。

result_part_path

String

合并后形成的 part 的路径。

partition

String

分区键。

partition_id

String

数据 part 插入到的分区的 ID。如果分区是根据 tuple() 进行的,则该列取值为 all

is_mutation

UInt8

如果此过程是 part mutation 操作,则为 1。

total_size_bytes_compressed

UInt64

合并 part 中压缩数据的总大小。

total_size_marks

UInt64

合并 part 中的 marks 总数。

bytes_read_uncompressed

UInt64

读取的未压缩字节数。

rows_read

UInt64

读取的行数。

bytes_written_uncompressed

UInt64

写入的未压缩字节数。

rows_written

UInt64

写入的行数。

columns_written

UInt64

写入的列数。

memory_usage

UInt64

合并过程的内存消耗。

thread_id

UInt64

合并过程的线程 ID。

merge_type

String

当前合并的类型。如果是 mutation,该字段为空。

merge_algorithm

String

当前合并中使用的算法。如果是 mutation,该字段为空。

示例

  • 查询当前正在执行的 merge 任务:

    select
        database,
        table,
        round(elapsed, 0) as elapsed_,
        round(progress, 2) as progress,
        num_parts as n_parts,
        result_part_name,
        total_size_marks as marks,
        columns_written as col_written,
        formatReadableSize(total_size_bytes_compressed) as total_size,
        thread_id,
        formatReadableSize(memory_usage) as memory
    from
        system.merges
    order by
        (database, table, elapsed)
    DESC;
    

    输出结果示例如下:
    Image

最近更新时间:2025.07.02 15:12:58
这个页面对您有帮助吗?
有用
有用
无用
无用