[SERVER-16265] Add query details to getmore entry in profiler and db.currentOp() Created: 21/Nov/14 Updated: 13/Dec/17 Resolved: 20/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.11, 3.0.4, 3.1.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jon Rangel (Inactive) | Assignee: | David Storch |
| Resolution: | Done | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||||||
| Sprint: | Quint Iteration 4 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||
| Description |
|
It is possible to run aggregation queries with the {cursor:{batchSize:0}} option, in order to quickly get back a cursor that can subsequently be iterated. This approach is documented here.
|
| Comments |
| Comment by David Storch [ 20/Sep/16 ] |
|
Hi admin@mixmax.com, The upcoming MongoDB 3.4 release will contain a number of improvements to the diagnostics reported in system.profile, the slow query logs, and db.currentOp(). The umbrella ticket for these changes is Regarding your specific question about getMore, Best, |
| Comment by Brad Vogel [ 20/Sep/16 ] |
|
Hi - I see that db.currentOp() now reveals the original query, but the slow query log still only reveals only that it is a `getmore` query: { "op" : "getmore", "ns" : "app-prod.snippets", "query" : { "getMore" : { "$numberLong" : "207536363671" }, "collection" : "snippets", "batchSize" : { "$numberLong" : "0" }}, "cursorid" : { "$numberLong" : "207536363671" }, "cursorExhausted" : true, "keyUpdates" : 0, "writeConflicts" : 0, "numYield" : 697, "locks" : { "Global" : { "acquireCount" : { "r" : { "$numberLong" : "1396" }} }, "Database" : { "acquireCount" : { "r" : { "$numberLong" : "698" }} }, "Collection" : { "acquireCount" : { "r" : { "$numberLong" : "698" }} } }, "nreturned" : 52212, "responseLength" : 3317968, "millis" : 38431, "execStats" : { }, "ts" : { "$date" : "2016-09-20T00:36:01.962+0000" }, "client" : "54.197.6.67", "allUsers" : [ { "user" : "app", "db" : "admin" }], "user" : "app@admin" } How can I figure out the original query from the above getmore? |
| Comment by Githook User [ 20/May/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit d89e58fd340ced9370d1a39a4334a42a77005f5e) Conflicts: |
| Comment by Githook User [ 20/May/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit d89e58fd340ced9370d1a39a4334a42a77005f5e) |
| Comment by Githook User [ 20/May/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |