-
Type: Bug
-
Resolution: Duplicate
-
Priority: Critical - P2
-
None
-
Affects Version/s: 2.6.11
-
Component/s: None
-
None
-
ALL
-
Take a look at this operation:
{ "opid" : 1453296, "active" : true, "secs_running" : 238, "microsecs_running" : NumberLong(238006204), "op" : "query", "ns" : "sensibill_loadtest.receipts", "query" : { "count" : "receipts", "query" : { "$comment" : { "source" : "admin.js:383", "version" : "d369cd29ba35" } }, "fields" : null }, "planSummary" : "COLLSCAN", "client" : "10.114.185.210:42439", "desc" : "conn155298", "threadId" : "0x7ebd51d57700", "connectionId" : 155298, "waitingForLock" : false, "numYields" : 95285, "lockStats" : { "timeLockedMicros" : { "r" : NumberLong(275342977), "w" : NumberLong(0) }, "timeAcquiringMicros" : { "r" : NumberLong(641132), "w" : NumberLong(0) } } },
We have code that adds a $comment to every query that we send to Mongo, so that we can track where it came from within our system.
Normally it does not change results. However, on this empty receipts.count() query, it triggers a collection scan. Arggghhh!
- duplicates
-
SERVER-20536 Combining $comment and .count() degrades performance
- Closed