> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing information about tasks in background schedule pools.

# system.background_schedule_pool

<Info>
  **Querying in ClickHouse Cloud**

  The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/reference/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
</Info>

<h2 id="description">
  Description
</h2>

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.

<h2 id="columns">
  Columns
</h2>

* `pool` ([String](/reference/data-types/index)) — 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](/reference/data-types/index)) — Database name.
* `table` ([String](/reference/data-types/index)) — Table name.
* `table_uuid` ([UUID](/reference/data-types/index)) — Table UUID.
* `query_id` ([String](/reference/data-types/index)) — Query ID (if executing now). Note: this is not a real query, but a randomly generated ID for matching logs in `system.text_log`.
* `elapsed_ms` ([UInt64](/reference/data-types/index)) — Task execution time (if executing now).
* `log_name` ([String](/reference/data-types/index)) — Log name for the task.
* `deactivated` ([UInt8](/reference/data-types/index)) — Whether the task is deactivated (always false, since deactivated tasks are removed from the pool).
* `scheduled` ([UInt8](/reference/data-types/index)) — Whether the task is scheduled for execution.
* `delayed` ([UInt8](/reference/data-types/index)) — Whether the task is scheduled with delay.
* `executing` ([UInt8](/reference/data-types/index)) — Whether the task is currently executing.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT * FROM system.background_schedule_pool LIMIT 5 FORMAT Vertical;
```

```text title="Response" theme={null}
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
```

<h2 id="see-also">
  See also
</h2>

* [system.background\_schedule\_pool\_log](/reference/system-tables/background_schedule_pool_log) — Contains history of background schedule pool task executions.
