跳转到主要内容
在 ClickHouse Cloud 中查询此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此,如需查看所有数据的完整情况,需要使用 clusterAllReplicas 函数。更多详情请参见此处

描述

包含有关后台调度池中任务的信息。后台调度池用于执行周期性任务,例如 Distributed 发送操作、缓冲区刷新以及消息代理操作。

  • pool (String) — 池名称。可能的值:schedule — 通用调度池,buffer_flush — 用于刷新 Buffer 表数据的池,distributed — 用于分布式表操作的池,message_broker — 用于消息代理操作的池。
  • database (String) — 数据库名称。
  • table (String) — 表名称。
  • table_uuid (UUID) — 表 UUID。
  • query_id (String) — 查询 ID (如果当前正在执行) 。注意:这不是真实的查询,而是一个随机生成的 ID,用于匹配 system.text_log 中的日志。
  • elapsed_ms (UInt64) — 任务执行时间 (如果当前正在执行) 。
  • log_name (String) — 任务的日志名称。
  • deactivated (UInt8) — 任务是否已停用 (始终为 false,因为已停用的任务会从池中移除) 。
  • scheduled (UInt8) — 任务是否已调度。
  • delayed (UInt8) — 任务是否为延迟调度。
  • executing (UInt8) — 任务当前是否正在执行。

示例

Query
SELECT * FROM system.background_schedule_pool LIMIT 5 FORMAT Vertical;
Response
Row 1:
──────
pool:        distributed
database:    default
table:       data
table_uuid:  00000000-0000-0000-0000-000000000000
query_id:
elapsed_ms:  0
log_name:    BackgroundJobsAssignee:DataProcessing
deactivated: 0
scheduled:   1
delayed:     0
executing:   0

另请参见

最后修改于 2026年6月10日