We need to replace the partition key with toYear(timestamp) to avoid this error:
ClickHouse error, Code: 252. DB::Exception: Too many partitions for single INSERT block (more than 12). The limit is controlled by 'max_partitions_per_insert_block' setting. 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). (TOO_MANY_PARTS) (version 23.8.2.7 (official build))\n
Description
We need to replace the partition key with
toYear(timestamp)
to avoid this error:ClickHouse error, Code: 252. DB::Exception: Too many partitions for single INSERT block (more than 12). The limit is controlled by 'max_partitions_per_insert_block' setting. 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). (TOO_MANY_PARTS) (version 23.8.2.7 (official build))\n