MongoDB count give not real result

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



MongoDB count give not real result



I have a MongoDB on Cosmos Azure account.
I have imported a JSON file using a command line and I have used this command:


mongoimport.exe --host xxxx.documents.azure.com:10255 -u xxxxx -p xxxxxxx --ssl --sslAllowInvalidCertificates --db admin --collection machineTest --type json --file "C:DBDB_STAGINGMachineTest.json"



and the response into cmd is "imported 5200 documents" but when I run a count query


db.machineTest.count()



the result is 1803 documents



Why the count gives me the not correct result?
Thanks




1 Answer
1



As we know, every operation in cosmos db consumes RUs.If it has not duplicate data,then per my experience, it is because that the size of your entire documents has exceeded the provisioned throughput limit. So, cosmos db returns documents under limitation.



You could follow below solutions to try to resolve the issue:



1.You could use continuation toke to query the rest of the documents.Please follow my previous case:Querying large collections in cosmos db



Hope it helps you.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard