Back to Clickhouse

system.background_schedule_pool

docs/en/operations/system-tables/background_schedule_pool.md

26.4.1.1-new2.3 KB
Original Source

import SystemTableCloud from '@site/docs/_snippets/_system_table_cloud.md';

system.background_schedule_pool

Contains information about tasks in background schedule pools. Background schedule pools are used for executing periodic tasks such as distributed sends, buffer flushes, and message broker operations.

Columns:

  • pool (String) — Pool name. Possible values:
    • schedule — General purpose schedule pool
    • buffer_flush — Pool for flushing Buffer table data
    • distributed — Pool for distributed table operations
    • message_broker — Pool for message broker operations
  • database (String) — Database name.
  • table (String) — Table name.
  • table_uuid (UUID) — Table UUID.
  • query_id (String) — Query ID (if executing now) (Note, it is not a real query, but just a randomly generated ID for matching logs in system.text_log).
  • elapsed_ms (UInt64) — Task execution time (if executing now).
  • log_name (String) — Log name for the task.
  • deactivated (UInt8) — Whether the task is deactivated (always false, since deactivated tasks are removed from the pool).
  • scheduled (UInt8) — Whether the task is scheduled for execution.
  • delayed (UInt8) — Whether the task is scheduled with delay.
  • executing (UInt8) — Whether the task is currently executing.

Example

sql
SELECT * FROM system.background_schedule_pool LIMIT 5 FORMAT Vertical;
text
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

See Also