The scenario is that:
I am querying for data (duh!)
Potentially filtering some out server-side because to query exactly is not possible/reasonable i.e. complex query
The database may be under considerable load. There may be numerous parallel requests including updates.
So, I could
a) Not limit() the query and just keep streaming data until I get enough. However, response time matters, so if the desired data is too sparse, a partial set may have to be returned before a whole page is retrieved.
b) Use limit() but occasionally re-query a couple of times in an attempt to retrieve a whole page of data. Again, the final result still may not be an entire set. The thinking here is that making a couple extra requests would be less load on the database.
I understand this is likely a "it depends" but I'm wondering if anyone has some insight to best practices or the best starting point to tune from.