MongoDB tip: use --eval and load(), storing executionStats, printjson
This is just a quick note to get the execution stats for a long query. var exp = db.getSiblingDB("device").upDown.explain("executionStats") exp.aggregate([ { $match: { lastModifiedTimestamp: { $lte: new Date(1569297599999) }, deviceId: { $in: [ { identifier: "001924" }, { identifier: "00D645" }, { identifier: "00D646" }, { identifier: "943000017688" }, { identifier: "005605" }, { identifier: "002217" }, { identifier: "00D641" }, { identifier: "004639" }, { identifier: "943000027922" }, { identifier: "004088" }, { identifier: "990003358538110" }, { identifier: "352648065432767" }, { identifier: "358683065700255" }, { identifier: "004888" }, { identifier: "004646" }, { identifier: "943000018098" }, { identifier: "359739074633462" }, { identifier: "352648065428153" }, { identifier: "...