0

I have a dfs table stored 5 billion tick data for one year the table partitioned by 'date' and 'code' , the table schema is as follows

date | time | code | bid | ask | bidvol | askvol
2020.03.05 |18:00:00.001 | 20012 | 0.01 | 0.02 | 100 | 200 

I want to select the data from 9:00 this morning to 16:00 the next afternoon . My code

tb = loadTable("dfs://db","tick")
timer select * from tb where code='2993' , concatDateTime(Date,Time) between pair(2020.03.05T07:00:00.000, 2020.03.05T18:00:00.000)
Time elapsed: 161.352 ms,

But if I take data of two days , it will be much faster ?

timer select * from tb where code='2993' , Date between pair(2020.03.05,2020.03.06)
Time elapsed: 41.813 ms

What's the reason?

1 Answer 1

0

I think this is due to partition pruning in DolphinDB. Check out this link from DolphinDB's manual:

https://www.dolphindb.com/help/index.html?Newtopic10.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.