Database question. I have data of this structure.
duration caller callee datetime
0 1110 33146060603 33238020000 2020-06-03 09:05:50.703710
1 0 33319185000 33447982364 2020-06-03 09:05:50.703710
2 0 33319185000 33447982364 2020-06-03 09:05:50.703710
3 0 33319185000 33447982364 2020-06-03 09:05:50.703710
4 0 33406780224 33407748000 2020-06-03 09:05:50.703710
5 0 33407816615 33483579000 2020-06-03 09:05:50.703710
6 0 33411703064 33455518000 2020-06-03 09:05:50.703710
That I receive every 5min (via rsync). The total number of rows received every day is around 1e9 (1B) rows. In total, I expect to gather around 100 days minimum. Ideally, it should be easy to remove one full day to save space over time.
I want to be able to query per caller, callee and datetime.
Almost all of my queries are SELECT * from DB where caller = 33319185000 OR callee 33319185000 and datetime IN (2020-06-03) (Selecting all the rows matching a phone number for say 50K numbers at a time).
Is there any type of efficient database to do this task?
I've researched quite a lot but I still haven't found a suitable way to solve this problem efficiently.