-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0
-
Component/s: Index Maintenance, Querying
-
Labels:None
Description:
We are using MongoDB Server version 3.4
We have a collection with 5.5 Million=(5482968) documents and indexSize=283.6MB . we have set the RAM Size as 1.1GB
When we try to retrieve the document count from MongoDBServer taking long time to respond and finally returning wrong count
we have created indexes on 8 fields on this collection .Our Collection Size =7.8GB
Issue we are facing:
1. Some times Wrong document count is returned from MongoDBServer
Actual Count Returned from MonogoDBServer=5080966
Expected Count Returned from MonogoDBServer=5482968
2. Some times MongoDBServer taking too long time to respond [in minutes]
Note: In production, this collection can grow to have more documents (Billions of documents)
Requesting you to Kindly address our below queries ,
a)Whether increasing the RAM Size will address our above Mentioned issues[count ]
b)Will reducing number of indexed columns/fields help in addressing these issues?
How to Reproduce:
1.Create a collection say 'testCollection' with 5.5Million or more document with average document size of 1.5KiB
2.Create index for 8 fields ensure that indexSize grows to >=280MB
3.Set the mongoDB RAMSize to 1.1GB
*db.adminCommand(
)*
4.Perform db.testCollection.count(with some condition on a field)