写入数据不多,但用gui查看前1000数据时,怎么会提示分区过多

明明只创建量一个组合分区,按照每日不同的合约进行分区。刚开始写数据,用gui查看前1000数据时,就提示分区过多。看量一下chunks目录文件夹也不多。第一层文件夹就是今天日期的文件夹,第二层文件夹包含20多个不同的合约命名的文件。

localhost:8848 Server response: 'select top 1000 * from pt => The number of partitions [77301] relevant to the query is too large. Please add more s pecific filtering conditions on partition columns in WHERE clause, or consider changing the value of the configuration parameter maxPartitionNumP erQuery.'

请先 登录 后评论

最佳答案 2023-04-27 14:20

是不是在创建数据库时,预先建了很多分区。可以用database("dfs://...").schema().partitionSchema确认一下。

避免出现这种问题的办法:

1.在建库时不要预先建太多分区;

2. 增大配置项maxPartitionNumPerQuery的值;

3. 在查询时缩小查询范围。

请先 登录 后评论

其它 0 个回答

  • 1 关注
  • 0 收藏,669 浏览
  • yiar 提出于 2023-04-26 23:07