Monday, April 6, 2015

M102: MongoDB for DBAs - Homework 3.2

Step 1:
In mongo shell run
homework.b()

operation will be very slow, you need to figure out the same

Step 2:
open another prompt
type below command in command prompt
 mongo --shell localhost/performance performance.js

note: do not close first shell

Step 3:
Using db.currentOp() you can check current running operation and using
db.killOp(?) you can kill the running operation

? - will be operation id
{ opid}

step 4:
now run homework.c()

you will get your answer as 12

No comments:

Post a Comment