We have 3 hundred million documents in Couchbase, and a view that we would like to query against from .NET SDK.
The key for the view is Guid_DateTime.
We want to get all the records matching a specific Guid. There is hesitation over the implementation regarding which approach would be more performant:
A) Looping query with moving startKey against view: query against the view using startKey = Guid, specify Limit, get startKey of the last row returned from the viewquery. On next iteration of loop, query against view using startKey of last row from previous loop. Loop until key is different.
B) Query against view using startKey = Guid, endKey = Guid+\uefff
A) could yield many calls against couchbase. B would be single call, but it could be very heavy.
We do not know how many keys match to one Guid.
My question is this: Does Couchbase server have some inner mechanisms that would make one option more performant than the other?
I have not been able to find the answer.