Reputation: 1
I have a collection with 90,000 records and each and every time,data is added onto it. But whenever I query 'select count(c.id) from c'. It will shows ambiguous result sometimes 20,190 or 19,916 or 22,897 like that, It won't able to give the exact output.
[
{
"$1": 21687
}
]
Upvotes: 0
Views: 141
Reputation: 9523
It's most likely that the query cannot finish in one shot. 20,000 is roughly the batch size we experience. To confirm this, look for a continuation token in the response headers. If there, you'll need to resubmit with that token until it comes back without a continuation token and sum all the counts from call-side.
Upvotes: 1