查询条件限定了一个月,为什么还说maxPartitionNumPerQuery不够大

如下图,我查询DolphinDB database中的分布式表,where函数限定一个月的数据,涉及分区数量大概30*50,但还是出现the number of partitions relevant to the query is too large的错误,请问这是为什么?

attachments-2021-06-G3apG7Hk60c81b86430eb.png

请先 登录 后评论

1 个回答

logger

where条件不能这么写,要写成如下:

select count(*) from dfsTab where date between 2018.12.01:2019.01.01 group by date

DolphinDB在解决海量数据的存取时,并不提供行级的索引,而是将分区作为数据库的物理索引。系统在执行分布式查询时,首先根据WHERE条件确定需要的分区。大多数分布式查询只涉及分布式表的部分分区,系统不必全表扫描,从而节省大量时间。但若不能根据where条件确定分区,就会全表扫描。具体可参阅分区设计教程第7节。

请先 登录 后评论