Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
366 views
in Technique[技术] by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...