> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用限制

> 介绍 ClickHouse Cloud 中推荐的使用限制

虽然 ClickHouse 以速度快、可靠性高而闻名，但要获得最佳性能，仍需在一定的运行参数范围内使用。
例如，表、数据库或 parts 数量过多都可能对性能造成负面影响。为避免这种情况，ClickHouse
Cloud 会在多个运行维度上施加限制。
这些保护性限制及其默认值的详细信息如下。

<Tip>
  如果你已经触及其中某项限制，说明你的用例实现方式可能还没有优化。请联系支持团队，
  我们很乐意帮助你优化用例，避免超出这些限制，
  或者共同探讨如何以可控的方式提高这些限制。
</Tip>

| 维度           | 限制                                                                                                         |
| ------------ | ---------------------------------------------------------------------------------------------------------- |
| **数据库**      | 1000                                                                                                       |
| **表**        | 5000                                                                                                       |
| **列**        | ∼1000 (相比 compact，更推荐 wide format)                                                                         |
| **分区**       | 50k                                                                                                        |
| **parts**    | 10k (参见 [`max_parts_in_total`](/docs/zh/products/cloud/guides/cloud-compatibility#max_parts_in_total-10000) 设置) |
| **part 大小**  | 150gb                                                                                                      |
| **每个组织的服务数** | 20 (软限制)                                                                                                   |
| **每个仓库的服务数** | 5 (软限制)                                                                                                    |
| **每个服务的副本数** | 20 (软限制)                                                                                                   |
| **低基数**      | 10k 或以下                                                                                                    |
| **单个表中的主键**  | 4-5 个，且应能充分过滤数据                                                                                            |
| **查询并发度**    | 1000 (每个副本)                                                                                                |
| **批次摄取**     | 任何 > 1M 的数据都会被系统拆分为每块 1M 行                                                                                 |

<Note>
  对于单副本服务，数据库的最大数量限制为
  100，表的最大数量限制为 500。此外，
  基础版服务的存储上限为 1 TB。
</Note>

<Note>
  对于已超出上述使用限制的服务，表/数据库限制会设置为该服务当前表/数据库数量加上 25%。
</Note>

你的服务的具体 warn 和 throw 限制可通过查询 system.server\_settings 来验证。例如，

```
SELECT * 
FROM system.server_settings 
WHERE name IN ('max_table_num_to_warn', 'max_table_num_to_throw', 'max_database_num_to_warn', 'max_database_num_to_throw')
```
