These settings are available in system.settings and are autogenerated from source.
max_partitions_per_insert_block
Version history
| Version | Default value | Comment |
|---|---|---|
| 19.5 | 100 | Add a limit for the number of partitions in one block |
Limits the maximum number of partitions in a single inserted block and an exception is thrown if the block contains too many partitions.
- Positive integer.
0— Unlimited number of partitions.
Details
When inserting data, ClickHouse calculates the number of partitions in the
inserted block. If the number of partitions is more than
max_partitions_per_insert_block, ClickHouse either logs a warning or throws an
exception based on throw_on_max_partitions_per_insert_block. Exceptions have
the following text:
“Too many partitions for a single INSERT block (
partitions_countpartitions, limit is “ + toString(max_partitions) + “). The limit is controlled by the ‘max_partitions_per_insert_block’ setting. A large number of partitions is a common misconception. It will lead to severe negative performance impact, including slow server startup, slow INSERT queries and slow SELECT queries. Recommended total number of partitions for a table is under 1000..10000. Please note, that partitioning is not intended to speed up SELECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc).”
max_partitions_to_read
Limits the maximum number of partitions that can be accessed in a single query.
The setting value specified when the table is created can be overridden via query-level setting.
Possible values:
- Positive integer
-1- unlimited (default)