【发布时间】:2019-10-04 20:29:19
【问题描述】:
我不知道如何增加每个查询的最大条目数。我想每个查询插入一千个条目,默认值为 100。
根据the doc,参数max_partitions_per_insert_block定义了同时进入的限制。
我尝试从 ClickHouse 客户端修改它,但我的插入仍然失败:
$ clickhouse-client
my-virtual-machine :) set max_partitions_per_insert_block=1000
*SET* max_partitions_per_insert_block = 1000
Ok.
0 rows in set. Elapsed: 0.001 sec.
此外,/etc/clickhouse-server/config.xml 文件中没有 max_partitions_per_insert_block 字段。
修改max_partitions_per_insert_block后,我尝试插入我的数据,但我遇到了这个错误:
infi.clickhouse_orm.database.ServerError: Code: 252, e.displayText() = DB::Exception: Too many partitions for single INSERT block (more than 100). 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). (version 19.5.3.8 (official build))
编辑:我仍然坚持这一点。我什至无法使用SET max_partitions_per_insert_block = 1000 手动将参数设置为我想要的值:该值已更改,但在退出并重新打开 clickhouse-client 后会返回 100(即使使用sudo,所以它看起来不像权限问题) .
【问题讨论】:
标签: clickhouse