My prod db is 300 gigs in size. Suppose I need to get the last 10 days record of a particular asset. I can send the entire 10 days in day from and day to range and mongo will send me all the data at once OR I can run a loop where I will send each day as day frm and day to range and mongo will send me the data. I have tried both but I can't determine the benefit of either. In some cases, I have figured sending request for each day is more beneficial than sending the whole request at a time.
I want to know which one is more efficient, what are the trade offs in between memory and cpu processing power.
Thank you in advance.