Skip to content

Instantly share code, notes, and snippets.

@werkshy
Created February 1, 2013 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save werkshy/4692229 to your computer and use it in GitHub Desktop.
Save werkshy/4692229 to your computer and use it in GitHub Desktop.
Slow $inc commands
Fri Feb 1 15:40:01 [conn1232539] update ctp.summaryLogEvent query: { organizationId: 242, day: "20130201" } update: { $inc: { hours.15.minutes.8.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:283655 141ms
Fri Feb 1 15:40:16 [conn1232171] update ctp.summaryLogEvent query: { organizationId: 308, day: "20130201" } update: { $inc: { hours.15.minutes.19.h: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:1154812 577ms
Fri Feb 1 15:40:21 [conn1232813] update ctp.summaryLogEvent query: { organizationId: 317, day: "20130201" } update: { $inc: { hours.15.minutes.29.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:553760 285ms
Fri Feb 1 15:40:22 [conn1232804] update ctp.summaryLogEvent query: { organizationId: 316, day: "20130201" } update: { $inc: { hours.15.minutes.21.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:2555236 1277ms
Fri Feb 1 15:40:24 [conn1232729] update ctp.summaryLogEvent query: { organizationId: 207, day: "20130201" } update: { $inc: { hours.15.minutes.12.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:220398 110ms
Fri Feb 1 15:40:27 [conn1232311] update ctp.summaryLogEvent query: { organizationId: 315, day: "20130201" } update: { $inc: { hours.15.minutes.8.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:323739 161ms
Fri Feb 1 15:40:28 [conn1232716] update ctp.summaryLogEvent query: { organizationId: 157, day: "20130201" } update: { $inc: { hours.15.minutes.30.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:243722 121ms
Fri Feb 1 15:40:28 [conn1232785] update ctp.summaryLogEvent query: { organizationId: 157, day: "20130201" } update: { $inc: { hours.15.minutes.39.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:447124 223ms
Fri Feb 1 15:40:29 [conn1232114] update ctp.summaryLogEvent query: { organizationId: 206, day: "20130201" } update: { $inc: { hours.15.minutes.14.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:456883 228ms
Fri Feb 1 15:40:29 [conn1232823] update ctp.summaryLogEvent query: { organizationId: 313, day: "20130201" } update: { $inc: { hours.15.minutes.21.o: 1 } } nscanned:1 nupdated:1 keyUpdates:0 locks(micros) w:424911 212ms
@werkshy
Copy link
Author

werkshy commented Feb 1, 2013

PRIMARY> db.summaryLogEvent.find({ organizationId: 242, day: "20130201" }).explain()
{
        "cursor" : "BtreeCursor organizationId_1_day_-1",
        "isMultiKey" : false,
        "n" : 1,
        "nscannedObjects" : 1,
        "nscanned" : 1,
        "nscannedObjectsAllPlans" : 1,
        "nscannedAllPlans" : 1,
        "scanAndOrder" : false,
        "indexOnly" : false,
        "nYields" : 0,
        "nChunkSkips" : 0,
        "millis" : 0,
        "indexBounds" : {
                "organizationId" : [
                        [
                                242,
                                242
                        ]
                ],
                "day" : [
                        [
                                "20130201",
                                "20130201"
                        ]
                ]
        },
        "server" : "xxxxxxxxxxxxxxx-02:27017"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment