-
Type:
Question
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.6.1
-
Component/s: Performance, Querying
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I have three collections sharded on 2 servers with date as shard key -
Collection A - 25 million documents with avg bsonSize: 700 bytes (10k -15k docs per day)
Collection B - 30 million documents with avg bsonSize: 500 bytes (12k -16k docs per day)
Collection C - 25 million documents with avg bsonSize: 1500 bytes (10k -15k docs per day)
Collection A & B gives decent (good) read performance like -
On first hit, for new date, i get records in almost 1 second (15k docs)
On second hit, it comes in 10-15 ms (due to cache)
But Collection C read performance is not as good -
On first hit, for new date, takes almost 50 seconds (15k docs, same number)
Second hit is fast as expected (5-10 ms)
Collection A & C are replica of each other in terms of Index and Shard Key. Only difference is collection A has fewer keys (50%) in comparison to collection C. And still so much difference in read performance?
This leads to conclusion - read performance depends on document size of collection. More the size is more time it will take to fetch documents on first hit (when not cached)..Is that right?
Any way to improve read performance of collection C ?
Thanks.