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

> 此表包含有关 ClickHouse 服务器的警告消息。

# system.warnings

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

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

<div id="description">
  ## 说明
</div>

此表显示有关 ClickHouse 服务器的警告。
相同类型的警告会合并为一条。
例如，如果已附加的数据库数量 N 超过可配置的阈值 T，则会显示一条包含当前值 N 的记录，而不是 N 条单独的记录。
如果当前值降到阈值以下，该记录就会从表中移除。

该表可通过以下设置进行配置：

* [max\_table\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_table_num_to_warn)
* [max\_database\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_database_num_to_warn)
* [max\_dictionary\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_dictionary_num_to_warn)
* [max\_view\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_view_num_to_warn)
* [max\_part\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_part_num_to_warn)
* [max\_pending\_mutations\_to\_warn](/zh/reference/settings/server-settings/settings#max_pending_mutations_to_warn)
* [max\_pending\_mutations\_execution\_time\_to\_warn](/zh/reference/settings/server-settings/settings#max_pending_mutations_execution_time_to_warn)
* [max\_named\_collection\_num\_to\_warn](/zh/reference/settings/server-settings/settings#max_named_collection_num_to_warn)
* [resource\_overload\_warnings](/zh/concepts/features/configuration/settings/server-overload#resource-overload-warnings)

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

* `message` ([String](/zh/reference/data-types/string)) — 警告信息。
* `message_format_string` ([LowCardinality(String)](/zh/reference/data-types/string)) — 用于格式化该消息的格式字符串。

<div id="example">
  ## 示例
</div>

```sql title="Query" theme={null}
 SELECT * FROM system.warnings LIMIT 2 \G;
```

```text title="Response" theme={null}
Row 1:
──────
message:               The number of active parts is more than 10.
message_format_string: The number of active parts is more than {}.

Row 2:
──────
message:               The number of attached databases is more than 2.
message_format_string: The number of attached databases is more than {}.
```
