Skip to content

Instantly share code, notes, and snippets.

@kgorman
Created October 26, 2012 04:35
Show Gist options
  • Save kgorman/3956846 to your computer and use it in GitHub Desktop.
Save kgorman/3956846 to your computer and use it in GitHub Desktop.
30013:PRIMARY> db.setProfilingLevel(2);
{ "was" : 0, "slowms" : 20, "ok" : 1 }
30013:PRIMARY> db.t.drop();
true
30013:PRIMARY> x={a:1}
{ "a" : 1 }
30013:PRIMARY> db.t.insert(x);
30013:PRIMARY> db.t.find();
{ "_id" : ObjectId("508a12d8ae35c0f1400789e1"), "a" : 1 }
30013:PRIMARY> db.system.profile.find({"ns":"test.t"});
{ "ts" : ISODate("2012-10-26T04:34:32.430Z"), "op" : "insert", "ns" : "test.t", "millis" : 0, "client" : "10.48.250.10", "user" : "" }
{ "ts" : ISODate("2012-10-26T04:34:36.915Z"), "op" : "query", "ns" : "test.t", "query" : { }, "nscanned" : 1, "nreturned" : 1, "responseLength" : 53, "millis" : 0, "client" : "10.48.250.10", "user" : "" }
30013:PRIMARY> db.t.update({},{$set:{"a":"dkjdkjfkfdjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgfkjgfkgjfkgjfkjgfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjf"}});
30013:PRIMARY> db.system.profile.find({"ns":"test.t"});
{ "ts" : ISODate("2012-10-26T04:34:32.430Z"), "op" : "insert", "ns" : "test.t", "millis" : 0, "client" : "10.48.250.10", "user" : "" }
{ "ts" : ISODate("2012-10-26T04:34:36.915Z"), "op" : "query", "ns" : "test.t", "query" : { }, "nscanned" : 1, "nreturned" : 1, "responseLength" : 53, "millis" : 0, "client" : "10.48.250.10", "user" : "" }
30013:PRIMARY> db.t.find();
{ "_id" : ObjectId("508a12d8ae35c0f1400789e1"), "a" : "dkjdkjfkfdjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgkfjgfkjgfkgjfkgjfkjgfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjfkgjf" }
30013:PRIMARY>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment